Remembering the rotation value in AS2

I have a movieclip that rotates 180 degrees in one frame of a flash game using the following code:
my_mc.onRelease=function(){
my_mc._rotation=my_mc._rotation+180;
if(my_mc._rotation==360){
my_mc._rotation=0;
A basic rotation function that works great.  But when I leave the frame and return to it the movie clip has reset itself to a rotation of zero.  How do I get the rotation value to stay 180 degrees when I return to the movieclip's frame?  I know how to do this with a mc's visibility by setting up a var. 
I have always gotten great help from these forums so thanks in advance.

yes, if you have more than 1 movieclip whose rotation you want to track, you could use something like;
var rotationValue1:Number;
var rotationValue2:Number;
if(!rotationValue1){
rotationValue1=0
} else {
my_mc._rotation=rotationValue1;
my_mc.onRelease=function(){
rotationValue1+=180;
this._rotation=rotationValue1;
if(!rotationValue2){
rotationValue2=0
} else {
my_mc2._rotation=rotationValue2;
my_m2c.onRelease=function(){
rotationValue2+=180;
this._rotation=rotationValue2;

Similar Messages

  • Converting rotatation value from flash into svg

    hi,
    Advance thankx for helping me
    Here i am taking the rotation value from flash and
    transfering into svg by the forumlae and getting varibale fdeg then
    also it is not coming in the position seen in flash window which is
    not in svg file.
    And also check the formulae is right to convert the value
    from angle to degree.
    if We scale the object it comes in right scaled and right x
    and y position. only if We rotate the rotated object is in correct
    angle but not in correct x,y axis position
    Regards,
    R.Denesh Kumar
    [email protected]

    post as2 questions in the as1/as2 forum. and if you use code
    in a message avoid using [ i ] or your code will be difficult to
    read.

  • How to remember the value in h:commandLink inside a h:datatable

    I have a h:dataTable storing header information, there is a column "refno" which is a h:commandlink (or h:outputlink) so user can select that column and jump to the detail page.
    My problem is how to remember the refno so I can use it in the detail page?
    a simplified code is as follows:
    <html>
        <body>
              <f:view>
                  <h:form id="select">
                  <h:dataTable value="#{dataTableBean.arr}" var="loc">
                      <h:column>
                          <f:facet name="header" >
                              <h:outputText value="Frameworks"/>
                          </f:facet>   
                          <h:outputLink value="openedTenderDetail.jsf"> // or h:commandLink
                                  <h:outputText value="#{loc.refNo}" />
                          </h:outputLink>                            
                     </h:column>
                 </h:dataTable>
              </f:view>
        </body>
    </html>

    hello
    u can use <f:param to remeber value and go to next page accordingly
    in detail
    use commandlink and in action get value of <f:param and then navigate to the desired page according to the param value
    regards
    Shakeel Abbas

  • I need my label to remember the value of the previous number in item renderer

    I have a label used as an item renderer and the dataprovider frequently changes. I need my label to remember the value of the previous number it was assigned to   {data.ask} but am having trouble doing this.
    Any ideas how to do this?

    You could override the data setter on the item renderer or listen for dataChange and store the value somewhere at that time.  This post demonstrates how to override the data setter or listen for dataChange:
    http://flexponential.com/2009/11/11/binding-warnings-when-using-object-in-a-list-dataprovi der/

  • How can I get the rotation information of my wrists in Kinect for Windows v2 ?

    Hi,all
    Assuming we make human wrist as the coordinate origin point of a three-dimensional space Cartesian coordinate, then when moving the wrist freely, what is the wrist rotation information in the coordinate system? Can kinect V2 describe it just like the degree
    of roll, pitch and yaw in Face Basics demo given in the V2 SDK Browser?
    Based on Kinect Studio 2.0 on 3D View model, it gives a vector arrow at each joint in real time, when I move, the direction of arrows changes correspondingly. So I think this may help me to get the information I want.  
    Here are my questions:
    1. Could I use Kinect V2 SDK to detect and output this information directly? If not, any suggestion to use the data which SDK output to get rotation information?    
    2. If the Q1 answer is yes, what is the accuracy of the sensor about the degree of roll, pitch and yaw on wrist?
    3. I have read Kinect V2 SDK documentation about the body class, the JointOrientations property description says that "the joint orientations of the body", what I want to know is the joint orientation based on
    what frame of reference? The specific value of body.JointOrientations looks what kind of data?
    Any advise or guidance would be greatly
    appreciated. 

    Thanks Carmine. It's really helps. But I still have some questions to ask.
    As you said "a quaternion value, where the
    Y component rotation is around the direction vector from the parent",and you also said "The
    orientation value is ...not the rotation from the parent",my English is poor so I am a little bit confused. 
    About the accuracy, What is the level of accuracy under ideal conditions?
    And in what circumstance
    that "value could be 180 rotated" thing could happen?
    Thank you for your time

  • How to 'remember' a field value inside a BAdI?

    Hi all,
    We need to implement some code in a BAdI for Healthcare. The BAdI is active in the PBO of transaction NV2000. We need to read the value of one field and, if this field has a certain value, default another field with a certain value.
    The problem is - this BAdI reads each time another structure which you can change, but the two fields in question are in two different structures. So it's like:
      CASE i_structure_name.
        WHEN 'RNBADI_ADM'.
          MOVE c_data TO ls_rnbadi_adm.
    *here I could read the value of my controle field which can be found in ls_rnbadi_adm
        WHEN 'RNBADI_EXTDOC_ADM'.
          MOVE c_data TO ls_rnbadi_extdoc_adm.
      here I could change my other field which can be found in ls_rnbadi_extdoc_adm
      give changed data back
          c_data = ls_rnbadi_extdoc_adm.
    The problem is, in the step where structure ls_rnbadi_extdoc_adm is filled, structure ls_rnbadi_adm is empty so the value of the control field is not accessible any more. The control field is also not an interface parameter so I don't really know its value at runtime... it can be changed so selecting it from the database is not a good idea...
    I thought to declare a 'static' variable and give it the value of the control field in the step where ls_rnbadi_adm was filled, so the program would remember it in the step where ls_rnbadi_extdoc_adm was filled. But the ABAP Editor gives a syntax error 'you can't declare statics inside an instance method'.
    So any idea how to 'remember' the value of that control field?
    Thanks in advance,
    Ioana

    Hi Ioana,
    You should not change the standard SAP interface but your implementation of the interface (the BADI). Use transaction SE19, enter the name of your implementation, Hit change and go to the tab Interface. Then double click on the name of the implementing class and go to the tab Attributes.
    Regards,
    John.

  • USB flash disk is not mounting, Xfce doesn't remember the setting

    Hello,
    I'm new in Archlinux and I think I can't set up it well. I use Linux for four years /Ubuntu, Debian/.
    Now I have installed system with X server, Slim and Xfce.
    1/ I have one big problem. I want to automount my flashdisk but it doesn't work like in Debian. I don't know what is wrong. When I put my flashdisk to USB, it's blinkig but nothing else happened. But I see the flashdisk in lsusb
    [root@arch martin]# lsusb
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
    Bus 004 Device 003: ID 04d9:048e Holtek Semiconductor, Inc. Optical Mouse
    Bus 001 Device 003: ID 1005:b113 Apacer Technology, Inc. Handy Steno 2.0/HT203
    2/ Xfce doesn't remember the settings... When I log out and log in again, the panel, desktop and keyboard have the default settings all the time.
    3/ All is in english. I'm from Czech Republic /excuse my bad english/ and I want to have applications in czech language. I've set up and generated locales but nothing happened...
    Thank you a lot to solve those problems!!
    Some files...
    rc.conf
    # /etc/rc.conf - Main Configuration for Arch Linux
    # LOCALIZATION
    # LOCALE: available languages can be listed with the 'locale -a' command
    # DAEMON_LOCALE: If set to 'yes', use $LOCALE as the locale during daemon
    # startup and during the boot process. If set to 'no', the C locale is used.
    # HARDWARECLOCK: set to "", "UTC" or "localtime", any other value will result
    # in the hardware clock being left untouched (useful for virtualization)
    # Note: Using "localtime" is discouraged, using "" makes hwclock fall back
    # to the value in /var/lib/hwclock/adjfile
    # TIMEZONE: timezones are found in /usr/share/zoneinfo
    # Note: if unset, the value in /etc/localtime is used unchanged
    # KEYMAP: keymaps are found in /usr/share/kbd/keymaps
    # CONSOLEFONT: found in /usr/share/kbd/consolefonts (only needed for non-US)
    # CONSOLEMAP: found in /usr/share/kbd/consoletrans
    # USECOLOR: use ANSI color sequences in startup messages
    LOCALE="cs_CZ.utf8"
    DAEMON_LOCALE="no"
    HARDWARECLOCK="localtime"
    TIMEZONE="Europe/Prague"
    KEYMAP="cz-qwertz"
    CONSOLEFONT="lat2-16"
    CONSOLEMAP="8859-2"
    USECOLOR="yes"
    # HARDWARE
    # MODULES: Modules to load at boot-up. Blacklisting is no longer supported.
    # Replace every !module by an entry as on the following line in a file in
    # /etc/modprobe.d:
    # blacklist module
    # See "man modprobe.conf" for details.
    MODULES=(nvidia)
    # Udev settle timeout (default to 30)
    UDEV_TIMEOUT=30
    # Scan for FakeRAID (dmraid) Volumes at startup
    USEDMRAID="no"
    # Scan for BTRFS volumes at startup
    USEBTRFS="no"
    # Scan for LVM volume groups at startup, required if you use LVM
    USELVM="no"
    # NETWORKING
    # HOSTNAME: Hostname of machine. Should also be put in /etc/hosts
    HOSTNAME="arch"
    # Use 'ip addr' or 'ls /sys/class/net/' to see all available interfaces.
    # Wired network setup
    # - interface: name of device (required)
    # - address: IP address (leave blank for DHCP)
    # - netmask: subnet mask (ignored for DHCP) (optional, defaults to 255.255.255.0)
    # - broadcast: broadcast address (ignored for DHCP) (optional)
    # - gateway: default route (ignored for DHCP)
    # Static IP example
    #interface=eth0
    #address=192.168.0.2
    #netmask=255.255.255.0
    #broadcast=192.168.0.255
    #gateway=192.168.0.1
    # DHCP example
    interface=eth0
    address=
    netmask=
    gateway=
    #interface=
    #address=
    #netmask=
    #broadcast=
    #gateway=
    # Setting this to "yes" will skip network shutdown.
    # This is required if your root device is on NFS.
    NETWORK_PERSIST="no"
    # Enable these netcfg profiles at boot-up. These are useful if you happen to
    # need more advanced network features than the simple network service
    # supports, such as multiple network configurations (ie, laptop users)
    # - set to 'menu' to present a menu during boot-up (dialog package required)
    # - prefix an entry with a ! to disable it
    # Network profiles are found in /etc/network.d
    # This requires the netcfg package
    #NETWORKS=(main)
    # DAEMONS
    # Daemons to start at boot-up (in this order)
    # - prefix a daemon with a ! to disable it
    # - prefix a daemon with a @ to start it up in the background
    # If something other takes care of your hardware clock (ntpd, dual-boot...)
    # you should disable 'hwclock' here.
    DAEMONS=(hwclock syslog-ng dbus udev evdev network netfs crond slim)
    eth0="dhcp"
    INTERFACES=(eth0)
    ROUTES=(!gateway)
    /etc/X11/xinit/xinitrc
    #!/bin/sh
    userresources=$HOME/.Xresources
    usermodmap=$HOME/.Xmodmap
    sysresources=/etc/X11/xinit/.Xresources
    sysmodmap=/etc/X11/xinit/.Xmodmap
    # merge in defaults and keymaps
    if [ -f $sysresources ]; then
    xrdb -merge $sysresources
    fi
    if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
    fi
    if [ -f "$userresources" ]; then
    xrdb -merge "$userresources"
    fi
    if [ -f "$usermodmap" ]; then
    xmodmap "$usermodmap"
    fi
    # start some nice programs
    if [ -d /etc/X11/xinit/xinitrc.d ] ; then
    for f in /etc/X11/xinit/xinitrc.d/* ; do
    [ -x "$f" ] && . "$f"
    done
    unset f
    fi
    #twm &
    #xclock -geometry 50x50-1+1 &
    #xterm -geometry 80x50+494+51 &
    #xterm -geometry 80x20+494-0 &
    #exec xterm -geometry 80x66+0+0 -name login
    exec ck-launch-session startxfce4
    /etc/slim.conf
    # Path, X server and arguments (if needed)
    # Note: -xauth $authfile is automatically appended
    default_path /bin:/usr/bin:/usr/local/bin
    default_xserver /usr/bin/X
    xserver_arguments -nolisten tcp vt07
    # Commands for halt, login, etc.
    halt_cmd /sbin/shutdown -h now
    reboot_cmd /sbin/shutdown -r now
    console_cmd /usr/bin/xterm -C -fg white -bg black +sb -T "Console login" -e /bin/sh -c "/bin/cat /etc/issue; exec /bin/login"
    #suspend_cmd /usr/sbin/suspend
    # Full path to the xauth binary
    xauth_path /usr/bin/xauth
    # Xauth file for server
    authfile /var/run/slim.auth
    # Activate numlock when slim starts. Valid values: on|off
    numlock on
    # Hide the mouse cursor (note: does not work with some WMs).
    # Valid values: true|false
    # hidecursor false
    # This command is executed after a succesful login.
    # you can place the %session and %theme variables
    # to handle launching of specific commands in .xinitrc
    # depending of chosen session and slim theme
    # NOTE: if your system does not have bash you need
    # to adjust the command according to your preferred shell,
    # i.e. for freebsd use:
    # login_cmd exec /bin/sh - ~/.xinitrc %session
    #login_cmd exec /bin/bash -login ~/.xinitrc %session
    login_cmd exec ck-launch-session startxfce4
    # Commands executed when starting and exiting a session.
    # They can be used for registering a X11 session with
    # sessreg. You can use the %user variable
    # sessionstart_cmd some command
    # sessionstop_cmd some command
    # Start in daemon mode. Valid values: yes | no
    # Note that this can be overriden by the command line
    # options "-d" and "-nodaemon"
    # daemon yes
    # Available sessions (first one is the default).
    # The current chosen session name is replaced in the login_cmd
    # above, so your login command can handle different sessions.
    # see the xinitrc.sample file shipped with slim sources
    sessions xfce4,icewm,wmaker,blackbox
    # Executed when pressing F11 (requires imagemagick)
    screenshot_cmd import -window root /slim.png
    # welcome message. Available variables: %host, %domain
    welcome_msg Welcome to %host
    # Session message. Prepended to the session name when pressing F1
    # session_msg Session:
    # shutdown / reboot messages
    shutdown_msg The system is halting...
    reboot_msg The system is rebooting...
    # default user, leave blank or remove this line
    # for avoid pre-loading the username.
    default_user martin
    # Focus the password field on start when default_user is set
    # Set to "yes" to enable this feature
    #focus_password no
    # Automatically login the default user (without entering
    # the password. Set to "yes" to enable this feature
    #auto_login no
    # current theme, use comma separated list to specify a set to
    # randomly choose from
    #current_theme default
    current_theme archlinux-darch-white
    # Lock file
    lockfile /var/lock/slim.lock
    # Log file
    logfile /var/log/slim.log
    locale -a
    [root@arch martin]# locale -a
    C
    POSIX
    cs_CZ.utf8
    en_US
    en_US.iso88591
    en_US.utf8
    Last edited by Zelva (2011-09-05 18:19:15)

    With xfce4 I use .....mount /dev/sd(xx) /mnt/md...
    Setup .../mnt/md in /mnt with ..cd /mnt...mkdir /mnt/md
    This will mount the flash drive.
    I do not know automount for xfce4.

  • Mass updating a multi-valued field- to append the new value

    I have a question on multi-valued fields:
    I have store table with 5 multi-valued fields, say MLB, soccer, college FTBL, college Basketball, etc. 
    A store can have 4 MLBs, 2 soccer teams, and so on. 
    Say, there is a new MLB that came out called Mexico MLB team. 
    A user wanted to add this to 30 stores using a mass update.  But remember the 30 stores can have totally different sets of values in the multi-valued fields.
    How can I add this new value while still preserving the MLB team’s values of each store record?
    Does MDM not support this feature?
    I am using SAP MDM SP6
    An answer would be highly appreciated.
    Thanks
    Savi

    Savi,
    I assume you are defined these fields as multi-value lookup and linked to main table. In general, you can not because it will mess up and overwrite your multi-value entries for all of your 30 store records.
    Here is something in MDM come in handy. It is following the same concept but design your model a little differently. If you model your multi-value fields into qualified lookup table, it will be easier and optimized to handle.
    You can select all 30 records and mass-update with adding the new MLB entry into your Q-lookup table. Once you save, this mass-update action will respect all your diversity of each individual records with the new value added.
    Hope this helps
    If this answers your question, please kindly reward the points.
    Regards
    Dawei

  • How can I make the spry accordion remember the panel open when I refresh the page or jump to a new page?

    How can I make the spry accordion remember the panel open
    when I refresh the page or jump to a new page?
    I am using the accordion feature on all my pages as a
    navigation aid. It has three panels. When you refresh the page the
    panel goes back to the default pane... Is there a way of
    controlling this so that the browser can remember the pane that is
    open (say set a variable, cookie, other?)

    Look for "Set the default open panel" on the following page:
    http://labs.adobe.com/technologies/spry/articles/accordion_overview/index.html
    Keep in mind you would need to change that bit of code on
    every page. The only way to do it more dynamically would be to
    include a custom javascript or PHP/ASP style script in order to
    change the value.

  • Size of the select value window in the portal for a query

    Hi,
    When I try to restrict the key figures structure in the portal (to select some key figures and hide others), the description of some key figures is truncated. It happens when the description of the key figure has been defined on several lines in the query designer.
    Does anyone knows how to increase the size of the lines in the "select filter value" window in the portal?
    Thanks,
    Gabriel

    Major Sparky
    Just a supplemental observations
    There are certain actions even in the project that remains open that will close the opened, sized, and positioned Project Window.
    Also
    1. If you go to dual monitor system, typically the program does not remember the dual monitor setup when the project is saved closed and reopened.
    2. If you use the project without a dual monitor system and save close project with the Preview Window open, sized, and positioned, when you re-open the project, the Preview Window is gone and would need to be reopened, sized, and positioned again.
    ATR

  • Controlling the 'Rotate View Tool'

    Hi there,
    I'm a Flash/Flex developer working with PatchPanel and SwitchBoard to build AIR apps that can communicate with Creative Suite tools.
    I was hoping to write a PatchPanel plug-in that would be able to control the 'Rotate View Tool' in Photoshop CS4 however, when I looked through the DOM there was no mention of it within the JavaScript Reference. My next tactic was to use the ScriptListener plug-in to record the action but alas, the resulting log did not contain the 'amount of rotation' as a variable :-(
    Can anyone verify whether it is possible to dynamically control the 'Rotate View Tool'? If so, how would I go about passing the desired rotation value from my PatchPanel plug-in to Photoshop?
    I should also say that I do not have access to the Photoshop SDK and have no experience of C++ but am willing to invest some time into solving this problem because I have something REALLY sweet planned. I'll keep it a surprise for now but if I can find a solution then I'd be more than happy to share it freely.
    Many thanks in advance...
    Cheers,
    Andy McDonald
    Centre for Advanced Textiles
    Glasgow School of Art

    Hi Andy,
    It doesn't look like there are public APIs in the SDK. You've also found that what you want is not Actionable, thus no scripting support. Sorry.
    Feel free to drop me an email and I can file a feature request.
    regards,
    steve

  • Hacking into the form values file to retrieve a post after closing a window

    Okay, I'd just finished editing and re-editing a very long post and was doublechecking some of the links when I inadvertedly closed the entire window instead of merely closing the tabbed page I'd brought the new link up on to test it.
    I poked around and found a long binary file called "Form Values" in library/safari directory and I would just bet this has my full post in it. I copied it to the desktop because I had a feeling that if I opened another form with Safari, the info would be rewritten and lost forever. So I do have a safety copy now.
    Anyone have any idea at all how I could retrieve that information, and convert it from binary back into text form so I would not have to spend another two hours remembering and rewriting the post?
    Or a way of getting Safari to recognize it and read it into a new post form?
    Boy, recovering data with a menu item like "undo close window" or a reopen sure would be a nice feature... I bet I'm not the only person that's done this.
    THANKS!!

    I just downloaded Hex Editor and gave myself a trip down memory lane (hadn't used one of these editors since my DOS days). Anyway, as I expected, it looks like the Form Values file is encrypted - there are no recognizable text strings to extract. In any case, this file contains the data you used to fill out forms at particular sites, it does not carry the entire page or form.
    You could try Retrospective to see if you can find the page with the form in Safari's cache. If you do find it, the form could be filled out as when you closed the window or it could be blank as when it was last loaded into Safari - I don't know which because I haven't searched the cache with this puspose in mind before.

  • Ho to Generate the Numeric Values Automatically before saving the records

    Hello to everybody,
    I have a data block naming “BILL” consisting of the following 3 field.
    1. Sr_No
    2. Bill_Amount
    3. Description
    This Data Block consist 10 records at a time.
    I want that whenever I insert records in the above data block.
    Serial No should automatically be generated.
    For this I have applied the following code in “WHEN-NEW-ITEM-INSTANCE” trigger.
    <CODE>
    SELECT NVL(MAX(Sr_No),0)+1 INTO :BILL.Sr_No FROM BILL;
    </CODE>
    Whenever I insert records in the BILL data block, the first row automatically generates the “Sr_No”, but when I move to the next record, (remember currently I have not saved the record), the same value which appeared in the previous record appears in the Sr_No field.
    For example, when I insert records for the first time in the BILL, the Sr_No field automatically generates value “1”, but when I move to the next record while not saving the first record the next row still generating value “1”, while it should be value “2” and so on.
    Note that I want that before saving the previous record when I move to the next row, the Sr_No should generate the next continuous value like in example.
    Please help me to solve out this problem.

    You have practically scratched you left ear with your right foot while jumping on the left foot :-)
    Seriously, you guys don't need to go to all this trouble.
    If you want a serial number incrementation, all you need to do is to either select the max value + 1 from the table or select the next value from a sequence in an PRE-INSERT trigger on block level, and that's it!!!!
    Tony

  • SSRS error "Conversion failed when converting the nvarchar value"

    Hi folks!
    After SCCM 2012 R2 upgrade, we have errors with self made reports:
    An error has occurred during report processing. (rsProcessingAborted)
    Cannot read the next data row for the dataset DataSet2. (rsErrorReadingNextDataRow)
    Conversion failed when converting the nvarchar value '*****' to data type int.
    I found several articles to see reporting services log file for possible WMI related errors, but none exists. SQL server is 2008R2, Runned mofcomp, and re-installed reporting services role, but problem remains.
    I traced the dataset2 query:
    SELECT
      v_Collection_Alias.CollectionID ,v_Collection_Alias.Name
    FROM fn_rbac_Collection(@UserSIDs) v_Collection_Alias
    WHERE
     v_Collection_Alias.CollectionType = 2
    Any adwice is appreciated.
    ~Tuomas.

    Hi Tuomas,
    What's the SQL Server version? To verify the the SQL Server version, please see
    http://support.microsoft.com/kb/321185
    SCCM 2012 R2 need SQL Server 2008 R2 SP1 with CU 6 or SQL Server 2008 R2 with SP2 (http://technet.microsoft.com/en-us/library/gg682077.aspx#BKMK_SupConfigSQLSrvReq).
    If the SQL meets requirement, I would suggest you submit a thread to SQL forum to deal with the sql issue.
    Thanks.
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

  • How can I use oracle function to decode the encode value

    Hi everybody,
    If the data is encode value how can I decode this value

    DBMS_OBFUSCATION_TOOLKIT
    DBMS_OBFUSCATION_TOOLKIT allows an application to encrypt data using either the Data Encryption Standard (DES) or the Triple DES algorithms.
    The Data Encryption Standard (DES), also known as the Data Encryption Algorithm (DEA) by the American National Standards Institute (ANSI) and DEA-1 by the International Standards Organization (ISO), has been a worldwide encryption standard for over 20 years. The banking industry has also adopted DES-based standards for transactions between private financial institutions, and between financial institutions and private individuals. DES will eventually be replaced by a new Advanced Encryption Standard (AES).
    DES is a symmetric key cipher; that is, the same key is used to encrypt data as well as decrypt data. DES encrypts data in 64-bit blocks using a 56-bit key. The DES algorithm ignores 8 bits of the 64-bit key that is supplied; however, developers must supply a 64-bit key to the algorithm.
    Triple DES (3DES) is a far stronger cipher than DES; the resulting ciphertext (encrypted data) is much harder to break using an exhaustive search: 2**112 or 2**168 attempts instead of 2**56 attempts. Triple DES is also not as vulnerable to certain types of cryptanalysis as is DES. DES procedures are as follows:
    DESEncrypt Procedure
    DESDecrypt Procedure
    Oracle installs this package in the SYS schema. You can then grant package access to existing users and roles as needed. The package also grants access to the PUBLIC role so no explicit grant needs to be done.
    This chapter discusses the following topics:
    Overview of Key Management
    Summary of DBMS_OBFUSCATION Subprograms
    Overview of Key Management
    Key management, including both generation and secure storage of cryptographic keys, is one of the most important aspects of encryption. If keys are poorly chosen or stored improperly, then it is far easier for a malefactor to break the encryption. Rather than using an exhaustive key search attack (that is, cycling through all the possible keys in hopes of finding the correct decryption key), cryptanalysts typically seek weaknesses in the choice of keys, or the way in which keys are stored.
    Key generation is an important aspect of encryption. Typically, keys are generated automatically through a random-number generator. Provided that the random number generation is cryptographically secure, this can be an acceptable form of key generation. However, if random numbers are not cryptographically secure, but have elements of predictability, the security of the encryption may be easily compromised.
    The DBMS_OBFUSCATION_TOOLKIT package does not generate encryption keys nor does it maintain them. Care must be taken by the application developer to ensure the secure generation and storage of encryption keys used with this package. Furthermore, the encryption and decryption done by the DBMS_OBFUSCATION_TOOLKIT takes place on the server, not the client. If the key is passed over the connection between the client and the server, the connection must be protected using Oracle Advanced Security; otherwise the key is vulnerable to capture over the wire.
    Key storage is one of the most important, yet difficult aspects of encryption and one of the hardest to manage properly. To recover data encrypted with a symmetric key, the key must be accessible to the application or user seeking to decrypt data. The key needs to be easy enough to retrieve that users can access encrypted data when they need to without significant performance degradation. The key also needs to be secure enough that it is not easily recoverable by an unauthorized user trying to access encrypted data he is not supposed to see.
    The three options available to a developer are:
    Store the key in the database
    Store the key in the operating system
    Have the user manage the key
    Storing the Key in the Database
    Storing the keys in the database cannot always provide bullet-proof security if you are trying to protect data against the DBA accessing encrypted data (since an all-privileged DBA can access tables containing encryption keys), but it can provide security against the casual snooper, or against someone compromising the database files on the operating system. Furthermore, the security you can obtain by storing keys in the database does not have to be bullet-proof in order to be extremely useful.
    For example, suppose you want to encrypt an employee's social security number, one of the columns in table EMP. You could encrypt each employee's SSN using a key which is stored in a separate column in EMP. However, anyone with SELECT access on the EMP table could retrieve the encryption key and decrypt the matching social security number. Alternatively, you could store the encryption keys in another table, and use a package to retrieve the correct key for the encrypted data item, based on a primary key-foreign key relationship between the tables.
    A developer could envelope both the DBMS_OBFUSCATION_TOOLKIT package and the procedure to retrieve the encryption keys supplied to the package. Furthermore, the encryption key itself could be transformed in some way (for example, XORed with the foreign key to the EMP table) so that the key itself is not stored in easily recoverable form.
    Oracle recommends using the wrap utility of PL/SQL to obfuscate the code within a PL/SQL package itself that does the encryption. That prevents people from breaking the encryption by looking at the PL/SQL code that handles keys, calls encrypting routines, and so on. In other words, use the wrap utility to obfuscate the PL/SQL packages themselves. This scheme is secure enough to prevent users with SELECT access to EMP from reading unencrypted sensitive data, and a DBA from easily retrieving encryption keys and using them to decrypt data in the EMP table. It can be made more secure by changing encryption keys regularly, or having a better key storage algorithm (so the keys themselves are encrypted, for example).
    Storing the Key in the Operating System
    Storing keys in the operating system (that is, in a flat file) is another option. With Oracle8i you can make callouts from PL/SQL, which you could use to retrieve encryption keys. If you store keys in the O/S and make callouts to retrieve the keys, the security of your encrypted data is only as secure as the protection of the key file on the O/S. Of course, a user retrieving keys from the operating system would have to be able to either access the Oracle database files (to decrypt encrypted data), or be able to gain access to the table in which the encrypted data is stored as a legitimate user.
    User-Supplied Keys
    If you ask a user to supply the key, it is crucial that you use network encryption, such as that provided by Oracle Advanced Security, so the key is not passed from client to server in the clear. The user must remember the key, or your data is nonrecoverable.
    http://download-west.oracle.com/docs/cd/B10501_01/appdev.920/a96612/d_obtool.htm#ARPLS028
    Joel P�rez

Maybe you are looking for

  • Re:File Adaptor

    Hello Xi Experts, I have a File to Idoc scenario in which Three seperate files are placed in a folder, XI need to pick up and forward to ECC as a IDOC. XI interface is as below, in which all three file strcutures are included in to one strcuture: Fil

  • Multiple Email Receivers for Error Notify

    Dear Gurus, Do you know how to set up multiple mail receivers for error notify? I tried out by using u2018;u2019 and u2018,u2019, and neither of them works. Thanks! Mao

  • Can i buy iphone 5 from apple store, in singapore now?

    I wanna know that can i buy the iphone 5 from apple store, in singapore now? or I have to order it and wait for weeks?

  • AI Group Config Error 10001 using Virtual Channels

    In my LabVIEW block diagram, I usually enter in numbers, e.g. 0,1,2 for the channel string input of AI Config. When I try to use a virtual channel, I simply type in the virtual channel, e.g. 0,K Thermocouple,2. However, this causes AI Group Config Er

  • How can I download Os X10.9 in french?

    I have update my Os 10.7 for Mac Mini Server, and my language is only in english. How can i translate in french, or how can i download in french language, i know it exist a french version. Thanks