Currently trying to encrypt plaintext that is 5 characters long into a 12 character encrypted string. I want to be able to specify a unique IV (not randomly generated), a unique key, and use DES. My current code requires the plaintext to be 8 characters long (5 character name plus 3 spaces).
Golang: How do I encrypt plain text that is 5 characters long with DES and CBC?
2k Views Asked by phil o.O At
1
There are 1 best solutions below
Related Questions in GO
- How do I get all the attributes of an XML element using Go?
- Type cast custom types to base types
- Why are Revel optional func parameters in controller not working? CRUD code redundancy
- Streaming commands output progress
- single ampersand between 2 expressions
- golang goroutine use SSHAgent auth doesn't work well and throw some unexpect panic
- How do I do a literal *int64 in Go?
- Emulating `docker run` using the golang docker API
- How to print contents of channel without changing it
- Golang time zone parsing not returning the correct zone on ubuntu server
- Is os.File's Write() threadsafe?
- How to get the pointer of return value from function call?
- How do I represent an Optional String in Go?
- Fibonacci in Go using channels
- Boltdb-key-Value Data Store purely in Go
Related Questions in BASE64
- Regex to get vCard base64 string (C#)
- writing into file (Converting Base64 to Binary) values Using VFS and ESB 4.8.1
- Can I POST or PUT an image to Django RESTful API using $resource of AngularJs or rather javascript in general?
- Python base32 data decode
- Encode array to base64 in go
- Save Task<string> type to String giving Catastrophic failure
- How to read a Base64 string as a file, on server side, without saving it in web server, directly by PHP?
- Angular base64 video interpolation fail ($sce)
- Gmail API playground: Send method, converted MIME raw header not populating email fields on send
- Convert data to base64 encode in go
- Base64Decode to file - whats missing?
- How can i save base64 to image file on cordova / ionic or upload to server?
- How to save encoded Base64 strings from database, to files, on disk?
- PHP base64 encoding drops incorrect answer
- base64 image open in new tab with fancybox, instead of the classic "popup"
Related Questions in DES
- DES Encryption and Decryption in PHP
- Java/Clojure BouncyCastle reports wrong key size, but key size is right
- Getting variable encryption results with VB.Net and DES
- Problems with Dictionary key-lookups. No match when there should be
- DES decryption only working when the key is 0s
- PyDES with Bloomberg data
- Android application: DES or RSA?
- Golang: How do I encrypt plain text that is 5 characters long with DES and CBC?
- How do you prepend an IV to the ciphertext in Go?
- DES encryption in Rubymotion
- Can someone explain the difference in openssl cli and c++ DES output
- How to implement DES encrypting with ('DES/CBC/PKCS5Padding' mode) in Ruby?
- Python DES libraries
- File ecnryption using DES decrypting garbage - C#
- Generate SecretKeySpec Keys in a specified range
Related Questions in CBC-MODE
- AES CBC - Have message input and output and IV and have to find key
- Inconsistencies in encryption between Java and Node
- C++ xor between 2 strings Null CBC
- Golang: How do I encrypt plain text that is 5 characters long with DES and CBC?
- Is there any secure improvement if I hash IV value?
- Increasing the diffusion of the AES-CBC encryption algorithm in pycrypto for python
- Decryption using AES 256 with key and salt values using Java
- How to identify and remove CBC ciphers in the CipherSuite?
- Decrypt AES/CBC/PKCS5Padding Encryption in Dart
- Question about AES / CBC / PKCS5Padding Decryption in the Java Programming Language
- Python 3 CBC fail because of double backslash byte
- How can you decrypt a ciphertext using CBC where the ciphertext is given along with IV and key
- Does AES/CBC really require IV parameter?
- Creating 8 byte IV in Java
- Encrypt and decrypt contents of a text file (Java)
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
I have already faced this problem. This is because of padding issue. The code you wanted is a
Code link You Can test it at go playground.