C/C++ :: How To Pad Characters In RSA Cryptography Technique
Oct 7, 2014How to pad characters in rsa algortihm.eg 'H' becomes 45 so how to do it so that i can use that in my equation.
View 1 RepliesHow to pad characters in rsa algortihm.eg 'H' becomes 45 so how to do it so that i can use that in my equation.
View 1 RepliesI'm looking for a resource (possibly CPP) for which I could do the following on a windows and linux machine:
1) type a string message into a GUI control (or some other input that can be accessed by the resource).
2) run a resource script that puts the message through a hash function (or a custom hash function) and outputs the hash string.
3) have a reverse function available in order to decrypt the message in an input fashion just like step #1.
what open-source resource might be the best for this? Right now I am imagining typing a message into a text file, saving the file to a hard drive location, running a script on it replacing the old file with a new file that just has a hash string in it, then using that hash string for the encoded message.
Given a set of DNA string. Find minimum length string S so that, given DNA strings are subsequence of S.
For example, if given set of string is: {CAGT, ATGC, CGTT, ACGT, AATT} then answer is: 8. Because, ACAGTGCT contains all given DNA as subsequence.
Given n such DNA string (n <= 8), each of length atmost 5. Find out the least length.
Sample:
5
AATT
CGTT
CAGT
ACGT
ATGC
Output:
8
Any way that one could create a bitfield using the standard technique of creating a structure within a union, as follows:
Code:
typedef union {
struct {
unsigned b0 : 1;
unsigned b1 : 1;
:
:
unsigned b(n-1) : 1;
} bits;
unsigned int value;
}
BIT_FIELD_TYPE; Except, what I'd like to do is to replace all the single-bit elements in the bits structure with a single statement that creates an array of, say, 32 values. The clear advantage of this is that it could be traversed using an iterator, ...
Code:
main() {
BIT_FIELD_TYPE foo;
unsigned int i;
...
for (i = 0; i < n; i++) {
... (print out foo.bits.b[i]) ...
}
So far, I've not figured out a way to do it, either as an array, or using a pointer to iterate through the individual bits.
how to create a hash table array and use linked lists inside the elements.
View 5 Replies View Relatedso my question is i want to print characters,no string just an array of characters,i do this but it s not working,maybe i have to put the '' at the end?
Code:
int main() {
int i;
char ch[5];
for(i = 0; i < 5; i++) {
scanf("%c",&ch[i]);
[Code]...
Im supposed to find the common characters between two string characters, assuming that the user wont input duplicate letters like ddog. When I run my code I get an output of a question mark upside down. Here is my code with comments on what each part is supposed to do
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(){
char str1[20], str2[20],remp = '