SQLlite Database Encryption Question

hello all, I'm developing Air Application using flex, I need to encrypt the database file. It is said that an encrytion key of exaclty 16 byte is needed...At the Start the user is given the option of either using an existing encryppted sql database or creating a new encrypted one. please how do i make sure a string is converted to a ByteArray with length of exaclty 16 byte....any form of explaination or sample code would help
Thanks

Sorry, the string that you pass to it must be conformed correctly.  If it isn't, it will throw this error message:
ArgumentError: The password must be a strong password. It must be 8-32 characters long. It must contain at least one uppercase letter, at least one lowercase letter, and at least one number or symbol.
Currently I am using the method below to generate a password.  I haven't had any issues with it not generating a password that isn't conformed correctly for the getEncryptionKey().  But you can easily edit it, for that it *will* contain "...at least one uppercase letter, at least one lowercase letter, and at least one number or symbol."
public static function generateRandomPassword(strHash:String = 'acbdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!@#$%^&*',lnHash:Number = 32):String
     var i:Number = 1;
     var hash:String = "";
     var nLenght:Number = strHash.length;
     while (i <= lnHash)
          var num:Number = Math.floor(Math.random()*nLenght)+1;
          hash += strHash.charAt(num);
          i++;
     return hash;
But also keep in mind, that this key will be stored in the ELS directory of the user's machine.  So it is protected by the OS by a certain degree.

Similar Messages

  • Database Encryption Question

    Hi All,
    We have an application that insert records to a remote database over a database link. From what I understand, the remote database is not on our network, and is accessed over the internet, or some unsecured network.
    So, I am being asked about encrypting the data. I'm not sure what they are referring to. I've seen posts referring to an Oracle package called dbms_obfuscation_toolkit.
    Or perhaps they are talking about encrypting the data during transport to the remote database?
    Can anyone provide me some insight into the encrypting of the data, and whether it is stored in the database that way, or is it just while it is in transit.....
    Thanks.

    If you are using a single key to encrypt all the data, you would only have to transmit the key when it changed. Some applications need to change the key periodically (i.e. when someone with access to the key is terminated, when there is a security breach, every N days, etc). Some applications use different keys for different pieces of data.
    Oracle Advanced Security (OAS) is definitely easier to deal with-- you make a couple of configuration settings and you're done. Rolling your own solution requires code on both systems and can get somewhat painful if you need to encrypt a lot of columns. Your security also depends on the ability of the remote site to keep your shared key secret.
    If you're transmitting data that is mostly non-confidential but has the occasional confidential element (i.e. credit card #'s, social security #'s, etc), DBMS_OBFUSCATION_TOOLKIT is probably appropriate. If the majority of the data you're sending needs to be encrypted, particularly if that is a legal requirement, I would tend to favor OAS.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • The certificate 'instance' cannot be dropped because it is bound to one or more database encryption key.

    my question is the as this one on this link
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/55deada2-95f1-46a9-82be-c7e684a4bddb/the-certificate-certname-cannot-be-dropped-because-it-is-bound-to-one-or-more-database-encryption?forum=sqlreplication. but there is no clear answer what to
    do . would anyone please help me and give me guidance?
    i had create a master key and a certificate under master database. and now i want to drop these certificate and master key from  this database and face with this error  :sg 3716, Level 16, State 15, Line 1
    The certificate 'TDECert' cannot be dropped because it is bound to one or more database encryption key .
    thanks in advance

    Have you enaled TDE for any user database? if yes, and you do not want to continue with having TDE encryption, then you need to run the first command by changing the dbname to that user database instead of master.
    ALTER DATABASE DBName SET ENCRYPTION OFF
    You can run below command to see if any database are encrypted using TDE
    Select is_encrypted,* from sys.databases
    Keerthi Deep | Blog SQLServerF1 |
    Facebook

  • Database encryption in multitenant

    Hi,
    We need to implement database encryption TDE on certain columns for SAP in multitenant environment.
    We have unique client id per customer.
    How does the 'database' encryption work in an multi-tenant environment? What if one company want certain fields encrypted and other does not.
    Regards,

    Yes Bitlocker
    http://technet.microsoft.com/en-us/library/ee832792(v=exchg.150).aspx
    Windows BitLocker (volume encryption)
    Windows BitLocker is a data protection feature in Windows Server 2008. BitLocker protects against data theft or exposure on computers that are lost or stolen, and it offers more secure data deletion when computers are decommissioned.
    Supported: All Exchange database and log files.
    Supported: All Exchange database and log files. Windows failover clusters require Windows Server 2008 R2 or Windows Server 2008 R2 SP1 and the following hotfix:
    You cannot enable BitLocker on a disk volume in Windows Server 2008 R2 if the computer is a failover cluster node. Exchange volumes with Bitlocker enabled are not supported on Windows
    failover clusters running earlier versions of Windows.
    For more information about Windows 7 BitLocker encryption, see
    BitLocker Drive Encryption in Windows 7: Frequently Asked Questions.
    Twitter!: Please Note: My Posts are provided “AS IS” without warranty of any kind, either expressed or implied.

  • Error while inserting records in sqlLite database

    Hi all
    I am building a hybrid web app in SMP using phonegap and html.
    I am trying to insert records in sql database but i get an error with an undefined error code
    Please see below :
    function openDatabaseFoo() {
      db = window.openDatabase(clientDBName, clientDBVersion, clientDBDisplayName, clientDBMaxSize);
    function createDBTables() {
      db.transaction(function(tx) {
      // Create mine table
      var fooCreate = 'CREATE TABLE IF NOT EXISTS ' + fooTable+ ' (empNo, empName)';
      tx.executeSql(fooCreate , [],
      function (tx, resultSet) {
                //success
      var msg = 'Sucessfully created';
      alert(msg);
      logSuccessMessage(msg);
                function (err) {
                //error code
                var msg = "Error creating table = " + err.code;
                alert(msg);
                logErrorMessage(msg);
    the creation of tables is happening properly because i am getting a success message in the alerts.
    I am getting the error when i am trying to insert records in the above table
    function insertDataTable(){
    db.transaction(function(tx) {
    var insertSql = 'INSERT INTO ' + fooTable + ' (empNo, empName) VALUES ("1603","baker")';
    tx.executeSql(insertSql, [],
      function (tx, resultSet) {
                //success
      var msg = 'Sucessful insertingdata.';
      alert(msg);
      logSuccessMessage(msg);
                function (err) {
                //error code
                var msg = "Error inserting data sql = " + insertSql + " Error code = " + err.code;
                alert(msg);
                logErrorMessage(msg);
    can some one please help.Also guide me where can i check the sqlLite database logs to see more about the error.
    I would really appreciate the help.I have been onto this since past few days now
    Regards
    Shweta

    What is err.code, or the value of msg when the error occurs?
    Thanks,
    Andrew.

  • Right way to code an AIR application that uses sqllite database

    I am developing an AIR application that uses sqllite database.I want to know the correct way in which I should create the connections and SQLstatements according to MVC pattern.For example,whether i should have a single SQLStatement object for all my sql operations or I should use separate objects for insert,delete,select etc.I know how to open connection,execute statements and all,but i want to know the professional way of writing it.

    Make a controller for connect to db and save the connection in global varible (in model). Use this connection variable whenever u wanna execute the sql statements. Create seperate dao's for each table. Queries should be executed under the daos. You can call the method under the dao for execute the query from controller and show the result in view.

  • AS3 BitmapData to Jpeg to SqlLite database to BitmapData

    Hi,
    using AS3, for an AIR application, I have a BitmapData object (obtained from webcam shot). I need to compress the image with JPEGEncoder and save it in a SQLLIte database (string?).
    And then I need to re-build the BitmapData object using the data stored in the database.
    It's importante the passage of the jpeg compression!
    Has someone an idea about how to implement this?
    THANK YOU IN ADVACE!

    the jpegencoder constructor accepts a quality parameter (and you can use the jpegencoderoptions class) to compress the file.
    here's more info:  Adobe Flash Platform * Compressing bitmap data

  • SAP 4.7 Encryption questions

    Dear SAP on i5 community,
    We are running SAP 4.7 and i5 OS 5.3.0 and have the following questions about how encryption works;
    Encryption questions
    1. How do we determine precisely what encryption algorithm is used to encrypt credit card data in our R/3 system?
    2. How are the encryption keys for this algorithm generated or provided?
    3. How and where are encryption keys for this algorithm are managed?
    4. Is there a way to change the encryption keys?
    We look forward to your replies...Thank you!
    TMM

    Hello Tim,
    You could take a look at the following blog and the Notes refered.
    Enable Credit Card Encryption
    If I am not mistaken...
    1. Decided by SAP already
    2. You generate the keys through SAP transactions (details in Notes and blog)
    3. Keys are saved in a file on the OS level (make sure it is safe)
    4. Yes, you can. But all the previous credit cards will be lost.
    Hope it helps.
    Best regards,
    Victor

  • SCOM database encryption

    I've seem it said nowhere if the database for the Audit Collection service is encrypted. I see encrypting the backup but not the running database. Does that need to or can it be done via SQL TDE?

    Hi,
    As far as I know, there is no document indicate how we encrypt SCOM database, including ACS database.
    There is an encryption key for secure data in the operational database, and with that key we can restore your SCOM database.
    In addition, for database encryption, you may also post in the SQL forum for further assistance.
    Regards,
    Yan Li
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact [email protected]

  • How to encrypt sqllite Database

    Hello,
    Can anyone please guide me how to encrypt sqlite database in flex?
    Thanks.

    You can try this example: http://www.adobe.com/devnet/air/flex/quickstart/articles/encrypted_database.html
    I'm  not sure if it also encrypts the actual data, though.

  • Database encryption supported in Exchange 2013?

    hi,
    according to this: 
    http://technet.microsoft.com/en-us/library/aa998022(v=exchg.80).aspx
    MS doesn't support storing Exchange databases on  EFS volumes.
    Is the recommendation the same for Exchange 2013?
    Is there any support for encrypting databases in an Exchange 2013 environment other than in transit traffic?
    Thanks,
    rudif

    Yes Bitlocker
    http://technet.microsoft.com/en-us/library/ee832792(v=exchg.150).aspx
    Windows BitLocker (volume encryption)
    Windows BitLocker is a data protection feature in Windows Server 2008. BitLocker protects against data theft or exposure on computers that are lost or stolen, and it offers more secure data deletion when computers are decommissioned.
    Supported: All Exchange database and log files.
    Supported: All Exchange database and log files. Windows failover clusters require Windows Server 2008 R2 or Windows Server 2008 R2 SP1 and the following hotfix:
    You cannot enable BitLocker on a disk volume in Windows Server 2008 R2 if the computer is a failover cluster node. Exchange volumes with Bitlocker enabled are not supported on Windows
    failover clusters running earlier versions of Windows.
    For more information about Windows 7 BitLocker encryption, see
    BitLocker Drive Encryption in Windows 7: Frequently Asked Questions.
    Twitter!: Please Note: My Posts are provided “AS IS” without warranty of any kind, either expressed or implied.

  • Database Encryption

    According to Payment Card Industry (PCI) Data Security Standard:
    meet the following
    minimum comparable key bit security:
    • 80 bits for secret key based systems (for example TDES)
    • 1024 bits modulus for public key algorithms based on the factorization
    (for example, RSA)
    • 1024 bits for the discrete logarithm (for example, Diffie-Hellman) with a
    minimum 160 bits size of a large subgroup (for example, DSA)
    • 160 bits for elliptic curve cryptography (for example, ECDSA)
    So in order to store credit card details in my 10g DB I have 3 questions, I was wondering if someone can help me with:
    Which of these encryptions Oracle support ?
    Which is the most secure?
    Is there any other Oracle products that will encryupt my data?
    Thank you in advance for your help.

    Dear drbiloukos,
    many of our customers have used TDE (Transparent Data Encryption) for their PCI compliance projects and passed successfully. If you are on 10gR2, it's recommended to upgrade to 10.2..0.4 or 10.2.0.5 as these include bug fixes that reduce the performance impact, storage impact, and general usability. What application do you want to protect, a custom or a packaged application?
    Please, for more details, see:
    http://www.oracle.com/technetwork/database/options/advanced-security/index-099011.html
    http://www.oracle.com/technetwork/database/security/twp-transparent-data-encryption-bes-130696.pdf
    http://www.oracle.com/technetwork/database/security/tde-faq-093689.html
    http://www.youtube.com/watch?v=ecdROBQIseI
    Best, Peter

  • Password encryption question

    I have a Input Screen with a password field. The client would like for users to input the password into this field and have it not be encrypted on screen, but encrypted when saved to the database.
    Can you please advise how to show this field normally on-screen but have it stored in the table encrypted?
    Im working with Apex 4.0
    Thank you
    Laura

    Problem with your logic is, the password should be STORED as a hashed value... When the user enters it, YES, you can display the text, but once it is saved to the database, you should NOT be displaying it unhashed....
    If a client asked me to do this, I would be having them document the heck out of the reasons they want such an insecure thing done in an application...
    Why exactly do they need a password displayed in plain text on a form?
    Thank you,
    Tony Miller
    Webster, TX
    Never Surrender Dreams!
    JMS
    If this question is answered, please mark the thread as closed and assign points where earned..

  • ACS 5.3 Database backup questions

                 I do an incermental backup every day at 02:00
    IncrementalBackup-Job
    Mon Sep 17 02:00:00 EST 2012
    Mon Sep 17 02:00:02 EST 2012
    Completed
    But  I get the  
    System Alarm [Database Purging]
    Mon Sep 17 04:00:00
    Incremental Backup not configured
    why?
    see contents of repository below so it is there
    CHIACS71/chacs01# sh repository DataBase
    acsviewdbfull_CHIACS71_20120912_095516.tar.gpg
    acsviewdbfull_CHIACS71_20120913_020000.tar.gpg
    acsviewdbincr_1_CHIACS71_20120914_020000.tar.gpg
    acsviewdbincr_2_CHIACS71_20120915_020000.tar.gpg
    acsviewdbincr_3_CHIACS71_20120916_020000.tar.gpg
    acsviewdbincr_4_CHIACS71_20120917_020000.tar.gpg
    catalog.xml
    repolock.cfg
    CHIACS71/chacs01#
    second question can I use my secondary ACS for the DataBase repository?

    Hi,
    You should use an nfs server, sftp or ftp repository for backups only, something that is dedicated for storage. I would not recommending using anything that is used for production which needs internal storage to take on the task of managing another applications data.
    As far as the the first question, i am not talking about the purging, i am talking about the scheduled application backups:
    http://www.cisco.com/en/US/docs/net_mgmt/cisco_secure_access_control_system/5.3/user/guide/admin_operations.html#wp1076238
    Tarik Admani
    *Please rate helpful posts*

  • Database connection question...

    i am using Java 1.5.0_06 and to connect to MySQL database i use Connector/J and the following code:
    try {
    Class.forName("com.mysql.jdbc.Driver");
    } catch(java.lang.ClassNotFoundException e) {
    System.err.print("Main: ClassNotFoundException: ");
    System.err.println(e.getMessage());
    return;
    try {
    con = DriverManager.getConnection(dburl);
    ps = con.prepareStatement(
    I was told i should be using a DataSource to do connection pooling and i have read over the info and downloaded jdbc2_0-stdext.jar and i am using MySQL and windows XP pro.
    the code looks like this
    Context ctx = new InitialContext();
    DataSource ds = (DataSource)ctx.lookup("jdbc/InventoryDB");
    Connection con = ds.getConnection("myUserName", "myPassword");
    then i just use con as i have already in my code.
    Can someone please point me in the right direction to get this working.
    I read this:
    A systems administrator or someone working in that capacity deploys a DataSource object. Deployment, which involves setting the DataSource object's properties and then registering it with a JNDI naming service, is generally done with a tool. As part of the registration process, the systems administrator will associate the DataSource object with a logical name. This name can be almost anything, usually being a name that describes the data source and that is easy to remember. In the example that follows, the logical name for the data source is InventoryDB . By convention, logical names for DataSource objects are in the subcontext jdbc , so the full logical name in this example is jdbc/InventoryDB .
    i have goggled but can't seem to find out exactly what i need to do next.
    I can't find the "tool" and have to be honest i am lost lol.
    can the The JDBC 2.0 Optional Package work with Java 1.5.0_06?

    i am using Java 1.5.0_06 and to connect to MySQL database i use Connector/J and the following code: i updated it to use manual connection pooling like so:
    final String dburl = "jdbc:mysql://localhost/......";
    Connection con = null;
    try {
    Class.forName("com.mysql.jdbc.Driver");
    } catch(java.lang.ClassNotFoundException e) {
    System.err.print("Main: ClassNotFoundException: ");
    System.err.println(e.getMessage());
    return;
    try {
    DataSource dataSource = setupDataSource(dburl);
    con = dataSource.getConnection();
    con.close();
    public static DataSource setupDataSource(String connectURI) {
    ObjectPool connectionPool = new GenericObjectPool(null);
    ConnectionFactory connectionFactory = new DriverManagerConnectionFactory(connectURI,null);
    PoolableConnectionFactory poolableConnectionFactory = new PoolableConnectionFactory(connectionFactory,connectionPool,null,null,false,true);
    PoolingDataSource dataSource = new PoolingDataSource(connectionPool);
    return dataSource;
    so i compiled and ran it and it worked no problem but my question is that this is a server that does some db work upon starting and then waits for clients like so:
    while (listening)
         new PSMultiServerThread(serverSocket.accept()).start();
    so once i am in PSMultiServerThread what exactly do i need to do?
    i know i don't need to do this again:
    Class.forName("com.mysql.jdbc.Driver");
    but do i need to do this again:
    DataSource dataSource = setupDataSource(dburl);
    i geuss i have to to declare the variable lol.
    and do i include this code in the PSMultiServerThread
    public static DataSource setupDataSource(String connectURI) {
    ObjectPool connectionPool = new GenericObjectPool(null);
    ConnectionFactory connectionFactory = new DriverManagerConnectionFactory(connectURI,null);
    PoolableConnectionFactory poolableConnectionFactory = new PoolableConnectionFactory(connectionFactory,connectionPool,null,null,false,true);
    PoolingDataSource dataSource = new PoolingDataSource(connectionPool);
    return dataSource;
    --------------------------------------------------------------------------------------

Maybe you are looking for

  • How do i see only contents of a KM folder in a iview?

    I made a KM navigation iview but when i see it through the assigned role i see the folder hierarchy on the left and on clicking on that i can see contents of the folder. The problem is I dont want the navigation on the left. I want a breadcrumb(of KM

  • How to add an upbeat note at the beginning of song?

    At the beginning of some songs you have that first up beat before the first down beat of a 4/4. Is there a way to add this on an ipad version? Thanks for your help!

  • How can I change my registration e-mail?

    How can I change my registration e-mail?

  • Exporting subtitles, OR changing from PAL to NTSC

    Hi, folks. I've made a DVD in PAL with full subtitles. I created the subtitles in Encore. My client now needs an NTSC copy of the disk. I can easily rebuild the menu, but retyping the subtitles will take an age! Is there a way to export the subtitles

  • FAX a smartform

    Hi all, I am new to smartforms and i'm trying to FAX a smartform. I am generating the smartform through an ABAP program and passing the following parameters:       CLEAR: SF_CONTROL_P, SF_OUTPUT_P.       SF_CONTROL_P-NO_DIALOG = 'X'.       SF_CONTROL