Mercurial > cgi-bin > hgweb.cgi > PassMan
comparison src/main/kotlin/name/blackcap/passman/Database.kt @ 6:711cc42e96d7
Got the list subcommand working, but needs efficiency improvements.
author | David Barts <n5jrn@me.com> |
---|---|
date | Tue, 20 Sep 2022 20:52:21 -0700 |
parents | ad997df1f560 |
children | f245b9a53495 |
comparison
equal
deleted
inserted
replaced
5:ad997df1f560 | 6:711cc42e96d7 |
---|---|
118 encryption.decryptToString(getBytes(columnIndex)) | 118 encryption.decryptToString(getBytes(columnIndex)) |
119 | 119 |
120 public fun ResultSet.getDecrypted(columnIndex: Int, encryption: Encryption) = | 120 public fun ResultSet.getDecrypted(columnIndex: Int, encryption: Encryption) = |
121 encryption.decrypt(getBytes(columnIndex)) | 121 encryption.decrypt(getBytes(columnIndex)) |
122 | 122 |
123 public fun ResultSet.getDecryptedString(columnLabel: String, encryption: Encryption) = | |
124 encryption.decryptToString(getBytes(columnLabel)) | |
125 | |
126 public fun ResultSet.getDecrypted(columnLabel: String, encryption: Encryption) = | |
127 encryption.decrypt(getBytes(columnLabel)) | |
128 | |
123 public fun PreparedStatement.setEncryptedString(columnIndex: Int, value: String, encryption: Encryption) = | 129 public fun PreparedStatement.setEncryptedString(columnIndex: Int, value: String, encryption: Encryption) = |
124 setBytes(columnIndex, encryption.encryptFromString(value)) | 130 setBytes(columnIndex, encryption.encryptFromString(value)) |
125 | 131 |
126 public fun PreparedStatement.setEncrypted(columnIndex: Int, value: CharArray, encryption: Encryption) = | 132 public fun PreparedStatement.setEncrypted(columnIndex: Int, value: CharArray, encryption: Encryption) = |
127 setBytes(columnIndex, encryption.encrypt(value)) | 133 setBytes(columnIndex, encryption.encrypt(value)) |