当前位置:   article > 正文

普通三进制逻辑数学世界先驱者——伍耀晖先生面向全球公布普通三进制逻辑数学全部真值表科研成果(伍氏定律)

三进制

准备组建“国际三进制科技联盟” 着手制造三进制 CPU

三进制一个字节用6个位表示 最高位为左 最低位为右表示 5 4 3 2 1 0 值范围从0到727 包含二进制字节全值范围

三进制负数采用同二进制一样的原理——补码表示 但是与二进制不同 很特别 1是不变的 只能0和2互变

TrinaryNot 0 1 2
                 2 1 0

TrinaryAnd   0 1 2        TrinaryNotAnd   0 1 2
                 0 0 0 0                              0 2 2 2
                 1 0 1 1                              1 2 1 1
                 2 0 1 2                              2 2 1 0

TrinaryOr   0 1 2        TrinaryNotOr   0 1 2
               0 0 1 2                            0 2 1 0
               1 1 1 2                            1 1 1 0
               2 2 2 2                            2 0 0 0

(相当于Xor异或 用于加密)TrinaryXor   0 1 2        等价   0 1 2        等价   0 1 2        等价   0 1 2
                                                             0 0 0 2               0 0 2 2               0 0 1 2              0 0 1 2
                                                             1 1 1 1               1 1 1 1               1 0 1 2              1 2 1 0
                                                             2 2 2 0               2 2 0 0               2 2 1 0              2 2 1 0

(相当于Xand同或 用于加密)TrinaryXand   0 1 2        等价   0 1 2        等价   0 1 2        等价   0 1 2
                                                                 0 2 0 0                0 2 2 0              0 2 1 0               0 2 1 0
                                                                 1 1 1 1                1 1 1 1              1 0 1 2               1 2 1 0
                                                                 2 0 2 2                2 0 0 2              2 0 1 2               2 0 1 2

普通三进制逻辑数学特有

(用于哈希码)TrinaryAdd   0 1 2        TrinaryNotAdd   0 1 2
                                         0 0 1 2                               0 2 1 0
                                         1 1 2 0                               1 1 0 2
                                         2 2 0 1                               2 0 2 1

(用于哈希码)TrinarySubtraction   0 1 2 或   0 1 2        TrinaryNotSubtraction   0 1 2 或   0 1 2
                                                     0 0 2 1    0 0 1 2                                          0 2 0 1    0 2 1 0
                                                     1 1 0 2    1 2 0 1                                          1 1 2 0    1 0 2 1
                                                     2 2 1 0    2 1 2 0                                          2 0 1 2    2 1 0 2

(用于哈希码)TrinaryMultiplication   0 1 2        TrinaryNotMultiplication   0 1 2
                                                        0 0 0 0                                             0 2 2 2
                                                        1 0 1 2                                             1 2 1 0
                                                        2 0 2 1                                             2 2 0 1

(用于哈希码)TrinaryDivision   0 1 2 或   0 1 2        TrinaryNotDivision   0 1 2 或   0 1 2
                                               0 0 0 0     0 0 0 0                                    0 2 2 2     0 2 2 2
                                               1 0 1 0     1 0 1 2                                    1 2 1 2     1 2 1 0
                                               2 0 2 1     2 0 0 1                                    2 2 0 1     2 2 2 1

以下是演示代码

C 源码

001
002
003
004
005
006
007
008
009
010
011
012
013
014
015
016
017
018
019
020
021
022
023
024
025
026
027
028
029
030
031
032
033
034
035
036
037
038
039
040
041
042
043
044
045
046
047
048
049
050
051
052
053
054
055
056
057
058
059
060
061
062
063
064
065
066
067
068
069
070
071
072
073
074
075
076
077
078
079
080
081
082
083
084
085
086
087
088
089
090
091
092
093
094
095
096
097
098
099
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
/*******************************************************
* 作者:伍耀晖                   Author: YaoHui.Wu           *
* 开源日期:2022年6月7日   Open Source Date: 2022-6-7  *
* 国家:中国               Country: China              *
*******************************************************/
 
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
 
void Usage()
{
    printf("Usage\n\tEncryption: TrinaryCipher -e/-E Plaintext.file Ciphertext.file Password\n\tDecryption: TrinaryCipher -d/-D Ciphertext.file Plaintext.file Password\n");
}
 
void Ternary(long long lNumeric,
             unsigned char *ucpTrinary)
{
    if(lNumeric < 1)
    {
        ucpTrinary[0] = ucpTrinary[1] = ucpTrinary[2] = ucpTrinary[3] = ucpTrinary[4] = ucpTrinary[5] =  0;
    }
    else
    {
        for(long long i = 5; i >= 0; --i)
        {
            ucpTrinary[i] = lNumeric % 3;
 
            lNumeric /= 3;
        }
    }
}
 
// 0 ? 2    0 1 2
// 1 1 1 or ? 1 ?
// 2 ? 0    2 1 0
 
void TernaryXor(unsigned char *ucpCiphertextOrPlaintext,
                unsigned char *ucpPassword)
{
    for(long long j = 0; j < 6; ++j)
    {
        if(ucpCiphertextOrPlaintext[j] == 0 && ucpPassword[j] == 0)
        {
            ucpCiphertextOrPlaintext[j] = 0;
        }
        else if(ucpCiphertextOrPlaintext[j] == 0 && ucpPassword[j] == 1)
        {
            ucpCiphertextOrPlaintext[j] = 2;
        }
        else if(ucpCiphertextOrPlaintext[j] == 0 && ucpPassword[j] == 2)
        {
            ucpCiphertextOrPlaintext[j] = 2;
        }
        else if(ucpCiphertextOrPlaintext[j] == 1 && ucpPassword[j] == 0)
        {
            ucpCiphertextOrPlaintext[j] = 1;
        }
        else if(ucpCiphertextOrPlaintext[j] == 1 && ucpPassword[j] == 1)
        {
            ucpCiphertextOrPlaintext[j] = 1;
        }
        else if(ucpCiphertextOrPlaintext[j] == 1 && ucpPassword[j] == 2)
        {
            ucpCiphertextOrPlaintext[j] = 1;
        }
        else if(ucpCiphertextOrPlaintext[j] == 2 && ucpPassword[j] == 0)
        {
            ucpCiphertextOrPlaintext[j] = 2;
        }
        else if(ucpCiphertextOrPlaintext[j] == 2 && ucpPassword[j] == 1)
        {
            ucpCiphertextOrPlaintext[j] = 0;
        }
        else if(ucpCiphertextOrPlaintext[j] == 2 && ucpPassword[j] == 2)
        {
            ucpCiphertextOrPlaintext[j] = 0;
        }
    }
}
 
// 2 ? 0    2 1 0
// 1 1 1 or ? 1 ?
// 0 ? 2    0 1 2
 
void TernaryXand(unsigned char *ucpCiphertextOrPlaintext,
                 unsigned char *ucpPassword)
{
    for(long long j = 0; j < 6; ++j)
    {
        if(ucpCiphertextOrPlaintext[j] == 0 && ucpPassword[j] == 0)
        {
            ucpCiphertextOrPlaintext[j] = 2;
        }
        else if(ucpCiphertextOrPlaintext[j] == 0 && ucpPassword[j] == 1)
        {
            ucpCiphertextOrPlaintext[j] = 0;
        }
        else if(ucpCiphertextOrPlaintext[j] == 0 && ucpPassword[j] == 2)
        {
            ucpCiphertextOrPlaintext[j] = 0;
        }
        else if(ucpCiphertextOrPlaintext[j] == 1 && ucpPassword[j] == 0)
        {
            ucpCiphertextOrPlaintext[j] = 1;
        }
        else if(ucpCiphertextOrPlaintext[j] == 1 && ucpPassword[j] == 1)
        {
            ucpCiphertextOrPlaintext[j] = 1;
        }
        else if(ucpCiphertextOrPlaintext[j] == 1 && ucpPassword[j] == 2)
        {
            ucpCiphertextOrPlaintext[j] = 1;
        }
        else if(ucpCiphertextOrPlaintext[j] == 2 && ucpPassword[j] == 0)
        {
            ucpCiphertextOrPlaintext[j] = 0;
        }
        else if(ucpCiphertextOrPlaintext[j] == 2 && ucpPassword[j] == 1)
        {
            ucpCiphertextOrPlaintext[j] = 2;
        }
        else if(ucpCiphertextOrPlaintext[j] == 2 && ucpPassword[j] == 2)
        {
            ucpCiphertextOrPlaintext[j] = 2;
        }
    }
}
 
long long main(long long argc,
               char *argv[])
{
    if(argc < 5)
    {
        Usage();
    }
    else if(*(short*)argv[1] == 0x452D || *(short*)argv[1] == 0x652D)
    {
        unsigned char ucPasswordLength = -1;
 
        while(argv[4][++ucPasswordLength]);
 
        unsigned char *ucpPassword = malloc(6 * ucPasswordLength);
 
        for(unsigned char i = 0; i < ucPasswordLength; ++i)
        {
            Ternary(argv[4][i], ucpPassword + 6 * i);
        }
 
        struct stat tStatFileSize;
 
        stat(argv[2], &tStatFileSize);
 
        long long lFileSize = tStatFileSize.st_size;
 
        int fdPlaintextOrCiphertext = open(argv[2], O_BINARY | O_RDONLY, S_IREAD | S_IWRITE);
 
        unsigned char *ucpPlaintext = malloc(lFileSize), ucaPlaintextOrCiphertext[6];
 
        read(fdPlaintextOrCiphertext, ucpPlaintext, lFileSize);
 
        close(fdPlaintextOrCiphertext);
 
        unsigned short *uspCiphertext = malloc(2 * lFileSize);
 
        for(long long j = 0, k = 0; j < lFileSize; ++j)
        {
            Ternary(ucpPlaintext[j], ucaPlaintextOrCiphertext);
 
            TernaryXor(ucaPlaintextOrCiphertext, ucpPassword + 6 * k);
            //TernaryXand(ucaPlaintextOrCiphertext, ucpPassword + 6 * k);
 
            uspCiphertext[j] = 243 * ucaPlaintextOrCiphertext[0] + 81 * ucaPlaintextOrCiphertext[1] + 27 * ucaPlaintextOrCiphertext[2] + 9 * ucaPlaintextOrCiphertext[3] + 3 * ucaPlaintextOrCiphertext[4] + ucaPlaintextOrCiphertext[5];
 
            k = ++k % ucPasswordLength;
        }
 
        fdPlaintextOrCiphertext = open(argv[3], O_BINARY | O_CREAT | O_WRONLY, S_IRUSR | S_IWUSR);
 
        write(fdPlaintextOrCiphertext, uspCiphertext, 2 * lFileSize);
 
        close(fdPlaintextOrCiphertext);
 
        free(uspCiphertext);
 
        free(ucpPlaintext);
    }
    else if(*(short*)argv[1] == 0x442D || *(short*)argv[1] == 0x642D)
    {
        unsigned char ucPasswordLength = -1;
 
        while(argv[4][++ucPasswordLength]);
 
        unsigned char *ucpPassword = malloc(6 * ucPasswordLength);
 
        for(long long i = 0; i < ucPasswordLength; ++i)
        {
            Ternary(argv[4][i], ucpPassword + 6 * i);
        }
 
        struct stat tStatFileSize;
 
        stat(argv[2], &tStatFileSize);
 
        long long lFileSize = tStatFileSize.st_size;
 
        int fdCiphertextOrPlaintext = open(argv[2], O_BINARY | O_RDONLY, S_IREAD | S_IWRITE);
 
        unsigned short *uspCiphertext = malloc(lFileSize);
 
        read(fdCiphertextOrPlaintext, uspCiphertext, lFileSize);
 
        close(fdCiphertextOrPlaintext);
 
        lFileSize /= 2;
 
        unsigned char *ucpPlaintext = malloc(lFileSize), ucaCiphertextOrPlaintext[6];
 
        for(long long j = 0, k = 0; j < lFileSize; ++j)
        {
            Ternary(uspCiphertext[j], ucaCiphertextOrPlaintext);
 
            TernaryXor(ucaCiphertextOrPlaintext, ucpPassword + 6 * k);
            //TernaryXand(ucaCiphertextOrPlaintext, ucpPassword + 6 * k);
 
            ucpPlaintext[j] = 243 * ucaCiphertextOrPlaintext[0] + 81 * ucaCiphertextOrPlaintext[1] + 27 * ucaCiphertextOrPlaintext[2] + 9 * ucaCiphertextOrPlaintext[3] + 3 * ucaCiphertextOrPlaintext[4] + ucaCiphertextOrPlaintext[5];
 
            k = ++k % ucPasswordLength;
        }
 
        fdCiphertextOrPlaintext = open(argv[3],  O_BINARY | O_CREAT | O_WRONLY, S_IRUSR | S_IWUSR);
 
        write(fdCiphertextOrPlaintext, ucpPlaintext, lFileSize);
 
        close(fdCiphertextOrPlaintext);
 
        free(ucpPlaintext);
 
        free(uspCiphertext);
    }
    else
    {
        Usage();
    }
 
    return 0;
}


Python 源码
[Python] 纯文本查看 复制代码
?
001
002
003
004
005
006
007
008
009
010
011
012
013
014
015
016
017
018
019
020
021
022
023
024
025
026
027
028
029
030
031
032
033
034
035
036
037
038
039
040
041
042
043
044
045
046
047
048
049
050
051
052
053
054
055
056
057
058
059
060
061
062
063
064
065
066
067
068
069
070
071
072
073
074
075
076
077
078
079
080
081
082
083
084
085
086
087
088
089
090
091
092
093
094
095
096
097
098
099
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
 
#*******************************************************
# 作者:伍耀晖             Author: YaoHui.Wu           *
# 开源日期:2022年6月7日   Open Source Date: 2022-6-7  *
# 国家:中国               Country: China              *
#*******************************************************
 
import sys
 
def Usage():
    print("Usage\n\tEncryption: python TrinaryCipher.py -e/-E Plaintext.file Ciphertext.file Password\n\tDecryption: python TrinaryCipher.py -d/-D Ciphertext.file Plaintext.file Password")
 
def Ternary(iNumeric):
    i, lTrinary = 0, [000000]
 
    if iNumeric and i < 6:
        while iNumeric:
            iNumeric, iRemainder = divmod(iNumeric, 3)
 
            lTrinary[i] = iRemainder
 
            += 1
 
    return lTrinary
 
# 0 ? 2    0 1 2
# 1 1 1 or ? 1 ?
# 2 ? 0    2 1 0
 
def TernaryXor(lTrinary, lPassword):
    for in range(6):
       if lTrinary[l] == lPassword[l] == 0: lTrinary[l] = "0"
 
       elif lTrinary[l] == 0 and lPassword[l] == 1: lTrinary[l] = "2"
 
       elif lTrinary[l] == 0 and lPassword[l] == 2: lTrinary[l] = "2"
 
       elif lTrinary[l] == 1 and lPassword[l] == 0: lTrinary[l] = "1"
 
       elif lTrinary[l] == lPassword[l] == 1: lTrinary[l] = "1"
 
       elif lTrinary[l] == 1 and lPassword[l] == 2: lTrinary[l] = "1"
 
       elif lTrinary[l] == 2 and lPassword[l] == 0: lTrinary[l] = "2"
 
       elif lTrinary[l] == 2 and lPassword[l] == 1: lTrinary[l] = "0"
 
       elif lTrinary[l] == lPassword[l] == 2: lTrinary[l] = "0"
 
    return int("".join(lTrinary[::-1]), 3)
 
# 2 ? 0    2 1 0
# 1 1 1 or ? 1 ?
# 0 ? 2    0 1 2
 
def TernaryXand(lTrinary, lPassword):
    for in range(6):
       if lTrinary[l] == lPassword[l] == 0: lTrinary[l] = "2"
 
       elif lTrinary[l] == 0 and lPassword[l] == 1: lTrinary[l] = "0"
 
       elif lTrinary[l] == 0 and lPassword[l] == 2: lTrinary[l] = "0"
 
       elif lTrinary[l] == 1 and lPassword[l] == 0: lTrinary[l] = "1"
 
       elif lTrinary[l] == lPassword[l] == 1: lTrinary[l] = "1"
 
       elif lTrinary[l] == 1 and lPassword[l] == 2: lTrinary[l] = "1"
 
       elif lTrinary[l] == 2 and lPassword[l] == 0: lTrinary[l] = "0"
 
       elif lTrinary[l] == 2 and lPassword[l] == 1: lTrinary[l] = "2"
 
       elif lTrinary[l] == lPassword[l] == 2: lTrinary[l] = "2"
 
    return int("".join(lTrinary[::-1]), 3)
 
if __name__ == "__main__":
    if len(sys.argv) < 5: Usage()
 
    elif sys.argv[1== "-e" or sys.argv[1== "-E":
        strPassword, lPassword, lCiphertext = sys.argv[4], [], []
 
        iPasswordLength, i = len(strPassword), 0
 
        for in range(iPasswordLength):
            lPassword.append(Ternary(ord(strPassword[j])))
 
        with open(sys.argv[2], "br") as fdPlaintext:
            bPlaintext = fdPlaintext.read()
 
            iFileSize = fdPlaintext.tell()
 
        for in range(iFileSize):
            lCiphertext.append(TernaryXor(Ternary(bPlaintext[k]), lPassword[i]))
            #lCiphertext.append(TernaryXand(Ternary(bPlaintext[k]), lPassword[i]))
 
            = (i + 1% iPasswordLength
 
        with open(sys.argv[3], "bw") as fdCiphertext:
            for iCiphertext in lCiphertext:
                fdCiphertext.write(iCiphertext.to_bytes(2"little"))
 
    elif sys.argv[1== "-d" or sys.argv[1== "-D":
        strPassword, lPassword, lPlaintext = sys.argv[4], [], []
 
        iPasswordLength, i = len(strPassword), 0
 
        for in range(iPasswordLength):
            lPassword.append(Ternary(ord(strPassword[j])))
 
        with open(sys.argv[2], "br") as fdCiphertext:
            bCiphertext = fdCiphertext.read(2)
 
            while bCiphertext:
                lPlaintext.append(TernaryXor(Ternary(int.from_bytes(bCiphertext, "little")), lPassword[i]))
                #lPlaintext.append(TernaryXand(Ternary(int.from_bytes(bCiphertext, "little")), lPassword[i]))
 
                = (i + 1% iPasswordLength
 
                bCiphertext = fdCiphertext.read(2)
 
        with open(sys.argv[3], "bw") as fdPlaintext:
            for iPlaintext in lPlaintext:
                fdPlaintext.write(iPlaintext.to_bytes(1"little"))
 
    else: Usage()


Java 源码
[Java] 纯文本查看 复制代码
?
001
002
003
004
005
006
007
008
009
010
011
012
013
014
015
016
017
018
019
020
021
022
023
024
025
026
027
028
029
030
031
032
033
034
035
036
037
038
039
040
041
042
043
044
045
046
047
048
049
050
051
052
053
054
055
056
057
058
059
060
061
062
063
064
065
066
067
068
069
070
071
072
073
074
075
076
077
078
079
080
081
082
083
084
085
086
087
088
089
090
091
092
093
094
095
096
097
098
099
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
/*******************************************************
* 作者:伍耀晖                   Author: YaoHui.Wu           *
* 开源日期:2022年6月7日   Open Source Date: 2022-6-7  *
* 国家:中国               Country: China              *
*******************************************************/
 
import java.io.*;
 
public class TrinaryCipher
{
    private static void Usage()
    {
        System.out.println("Usage\n\tEncryption: java TrinaryCipher -e/-E Plaintext.file Ciphertext.file Password\n\tDecryption: java TrinaryCipher -d/-D Ciphertext.file Plaintext.file Password\n");
    }
 
    private static void Ternary(int iNumeric,
                                byte[] baTrinary)
    {
        if(iNumeric < 1)
        {
            baTrinary[0] = baTrinary[1] = baTrinary[2] = baTrinary[3] = baTrinary[4] = baTrinary[5] =  0;
        }
        else
        {
            for(int i = 5; i >= 0; --i)
            {
                baTrinary[i] = (byte)(iNumeric % 3);
 
                iNumeric /= 3;
            }
        }
    }
 
// 0 ? 2    0 1 2
// 1 1 1 or ? 1 ?
// 2 ? 0    2 1 0
 
    private static void TernaryXor(byte[] baCiphertextOrPlaintext,
                                   byte[] baPassword)
    {
        for(int j = 0; j < 6; ++j)
        {
            if(baCiphertextOrPlaintext[j] == 0 && baPassword[j] == 0)
            {
                baCiphertextOrPlaintext[j] = 0;
            }
            else if(baCiphertextOrPlaintext[j] == 0 && baPassword[j] == 1)
            {
                baCiphertextOrPlaintext[j] = 2;
            }
            else if(baCiphertextOrPlaintext[j] == 0 && baPassword[j] == 2)
            {
                baCiphertextOrPlaintext[j] = 2;
            }
            else if(baCiphertextOrPlaintext[j] == 1 && baPassword[j] == 0)
            {
                baCiphertextOrPlaintext[j] = 1;
            }
            else if(baCiphertextOrPlaintext[j] == 1 && baPassword[j] == 1)
            {
                baCiphertextOrPlaintext[j] = 1;
            }
            else if(baCiphertextOrPlaintext[j] == 1 && baPassword[j] == 2)
            {
                baCiphertextOrPlaintext[j] = 1;
            }
            else if(baCiphertextOrPlaintext[j] == 2 && baPassword[j] == 0)
            {
                baCiphertextOrPlaintext[j] = 2;
            }
            else if(baCiphertextOrPlaintext[j] == 2 && baPassword[j] == 1)
            {
                baCiphertextOrPlaintext[j] = 0;
            }
            else if(baCiphertextOrPlaintext[j] == 2 && baPassword[j] == 2)
            {
                baCiphertextOrPlaintext[j] = 0;
            }
        }
    }
 
// 2 ? 0    2 1 0
// 1 1 1 or ? 1 ?
// 0 ? 2    0 1 2
 
    private static void TernaryXand(byte[] baCiphertextOrPlaintext,
                                    byte[] baPassword)
    {
        for(int j = 0; j < 6; ++j)
        {
            if(baCiphertextOrPlaintext[j] == 0 && baPassword[j] == 0)
            {
                baCiphertextOrPlaintext[j] = 2;
            }
            else if(baCiphertextOrPlaintext[j] == 0 && baPassword[j] == 1)
            {
                baCiphertextOrPlaintext[j] = 0;
            }
            else if(baCiphertextOrPlaintext[j] == 0 && baPassword[j] == 2)
            {
                baCiphertextOrPlaintext[j] = 0;
            }
            else if(baCiphertextOrPlaintext[j] == 1 && baPassword[j] == 0)
            {
                baCiphertextOrPlaintext[j] = 1;
            }
            else if(baCiphertextOrPlaintext[j] == 1 && baPassword[j] == 1)
            {
                baCiphertextOrPlaintext[j] = 1;
            }
            else if(baCiphertextOrPlaintext[j] == 1 && baPassword[j] == 2)
            {
                baCiphertextOrPlaintext[j] = 1;
            }
            else if(baCiphertextOrPlaintext[j] == 2 && baPassword[j] == 0)
            {
                baCiphertextOrPlaintext[j] = 0;
            }
            else if(baCiphertextOrPlaintext[j] == 2 && baPassword[j] == 1)
            {
                baCiphertextOrPlaintext[j] = 2;
            }
            else if(baCiphertextOrPlaintext[j] == 2 && baPassword[j] == 2)
            {
                baCiphertextOrPlaintext[j] = 2;
            }
        }
    }
 
    public static void main(String[] args)
    {
        if(args.length < 4)
        {
            Usage();
        }
        else if(args[0].equals("-e") || args[0].equals("-E"))
        {
            int iPasswordLength = args[3].length();
 
            byte[][] baPassword = new byte[iPasswordLength][6];
 
            for(int i = 0; i < iPasswordLength; ++i)
            {
                Ternary(args[3].getBytes()[i], baPassword[i]);
            }
 
            RandomAccessFile rafPlaintext = null, rafCiphertext = null;
 
            try
            {
                rafPlaintext = new RandomAccessFile(args[1], "r");
 
                rafCiphertext = new RandomAccessFile(args[2], "rw");
 
                long lFileSize = rafPlaintext.length();
 
                rafCiphertext.setLength(2 * lFileSize);
 
                byte[] baPlaintextOrCiphertext = new byte[6];
 
                int k = 0;
 
                for(long j = 0; j < lFileSize; ++j)
                {
                    Ternary(rafPlaintext.readUnsignedByte(), baPlaintextOrCiphertext);
 
                    TernaryXor(baPlaintextOrCiphertext, baPassword[k]);
                    //TernaryXand(baPlaintextOrCiphertext, baPassword[k]);
 
                    rafCiphertext.writeShort(243 * baPlaintextOrCiphertext[0] + 81 * baPlaintextOrCiphertext[1] + 27 * baPlaintextOrCiphertext[2] + 9 * baPlaintextOrCiphertext[3] + 3 * baPlaintextOrCiphertext[4] + baPlaintextOrCiphertext[5]);
 
                    k = ++k % iPasswordLength;
                }             
            }
            catch(Exception e)
            {
                e.printStackTrace();
            }
            finally
            {
                try
                {
                    if(rafCiphertext != null)
                    {
                        rafCiphertext.close();
                    }
 
                    if(rafPlaintext != null)
                    {
                        rafPlaintext.close();
                    }
                }
                catch(Exception e)
                {
                    e.printStackTrace();
                }
            }
        }
        else if(args[0].equals("-d") || args[0].equals("-D"))
        {
            int iPasswordLength = args[3].length();
 
            byte[][] baPassword = new byte[iPasswordLength][6];
 
            for(int i = 0; i < iPasswordLength; ++i)
            {
                Ternary(args[3].getBytes()[i], baPassword[i]);
            }
 
            RandomAccessFile rafCiphertext = null, rafPlaintext = null;
 
            try
            {
                rafCiphertext = new RandomAccessFile(args[1], "r");
 
                rafPlaintext = new RandomAccessFile(args[2], "rw");
 
                long lFileSize = rafCiphertext.length() / 2;
 
                rafPlaintext.setLength(lFileSize);
 
                byte[] baCiphertextOrPlaintext = new byte[6];
 
                int k = 0;
 
                for(long j = 0; j < lFileSize; ++j)
                {
                    Ternary(rafCiphertext.readUnsignedShort(), baCiphertextOrPlaintext);
 
                    TernaryXor(baCiphertextOrPlaintext, baPassword[k]);
                    //TernaryXand(baCiphertextOrPlaintext, baPassword[k]);
 
                    rafPlaintext.writeByte(243 * baCiphertextOrPlaintext[0] + 81 * baCiphertextOrPlaintext[1] + 27 * baCiphertextOrPlaintext[2] + 9 * baCiphertextOrPlaintext[3] + 3 * baCiphertextOrPlaintext[4] + baCiphertextOrPlaintext[5]);
 
                    k = ++k % iPasswordLength;
                }
            }
            catch(Exception e)
            {
                e.printStackTrace();
            }
            finally
            {
                try
                {
                    if(rafPlaintext != null)
                    {
                        rafPlaintext.close();
                    }
 
                    if(rafCiphertext != null)
                    {
                        rafCiphertext.close();
                    }
                }
                catch(Exception e)
                {
                    e.printStackTrace();
                }
            }
        }
        else
        {
            Usage();
        }
    }
}


Pascal 源码
[Delphi] 纯文本查看 复制代码
?
001
002
003
004
005
006
007
008
009
010
011
012
013
014
015
016
017
018
019
020
021
022
023
024
025
026
027
028
029
030
031
032
033
034
035
036
037
038
039
040
041
042
043
044
045
046
047
048
049
050
051
052
053
054
055
056
057
058
059
060
061
062
063
064
065
066
067
068
069
070
071
072
073
074
075
076
077
078
079
080
081
082
083
084
085
086
087
088
089
090
091
092
093
094
095
096
097
098
099
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
(*******************************************************
* 作者:伍耀晖                   Author: YaoHui.Wu           *
* 开源日期:2022年6月7日   Open Source Date: 2022-6-7  *
* 国家:中国               Country: China              *
*******************************************************)
(* Compiled by free pascal. free pascal website: www.freepascal.org *)
 
Program TrinaryCipher;
 
Type
   TrinaryArray = Array[0..5Of Byte;
 
Procedure Usage();
Begin
    writeln('Usage'#10#9'Encryption: TrinaryCipher -e/-E Plaintext.file Ciphertext.file Password'#10#9'Decryption: TrinaryCipher -d/-D Ciphertext.file Plaintext.file Password');
End;
 
Procedure Ternary(wNumeric : Word;
                  Var baTrinary : TrinaryArray);
Var
    i : Byte;
 
Begin
    If wNumeric < 1 Then
    Begin
        baTrinary[0] := 0;
 
        baTrinary[1] := 0;
 
        baTrinary[2] := 0;
 
        baTrinary[3] := 0;
 
        baTrinary[4] := 0;
 
        baTrinary[5] := 0;
    End
    Else
    Begin
        For i := 5 DownTo 0 Do
        Begin
            baTrinary[i] := wNumeric Mod 3;
 
            wNumeric := wNumeric Div 3;
        End;
    End;
End;
 
(*
 0 ? 2    0 1 2
 1 1 1 or ? 1 ?
 2 ? 0    2 1 0
*)
 
Procedure TernaryXor(Var baCiphertextOrPlaintext : TrinaryArray;
                     Var baPassword : TrinaryArray);
Var
    j : Byte;
 
Begin
    For j := 0 To 5 Do
    Begin
        If (baCiphertextOrPlaintext[j] = 0And (baPassword[j] = 0Then
        Begin
            baCiphertextOrPlaintext[j] := 0;
        End
        Else If (baCiphertextOrPlaintext[j] = 0And (baPassword[j] = 1Then
        Begin
            baCiphertextOrPlaintext[j] := 2;
        End
        Else If (baCiphertextOrPlaintext[j] = 0And (baPassword[j] = 2Then
        Begin
            baCiphertextOrPlaintext[j] := 2;
        End
        Else If (baCiphertextOrPlaintext[j] = 1And (baPassword[j] = 0Then
        Begin
            baCiphertextOrPlaintext[j] := 1;
        End
        Else If (baCiphertextOrPlaintext[j] = 1And (baPassword[j] = 1Then
        Begin
            baCiphertextOrPlaintext[j] := 1;
        End
        Else If (baCiphertextOrPlaintext[j] = 1And (baPassword[j] = 2Then
        Begin
            baCiphertextOrPlaintext[j] := 1;
        End
        Else If (baCiphertextOrPlaintext[j] = 2And (baPassword[j] = 0Then
        Begin
            baCiphertextOrPlaintext[j] := 2;
        End
        Else If (baCiphertextOrPlaintext[j] = 2And (baPassword[j] = 1Then
        Begin
            baCiphertextOrPlaintext[j] := 0;
        End
        Else If (baCiphertextOrPlaintext[j] = 2And (baPassword[j] = 2Then
        Begin
            baCiphertextOrPlaintext[j] := 0;
        End
    End;
End;
 
(*
 2 ? 0    2 1 0
 1 1 1 or ? 1 ?
 0 ? 2    0 1 2
*)
 
Procedure TernaryXand(Var baCiphertextOrPlaintext : TrinaryArray;
                      Var baPassword : TrinaryArray);
Var
    j : Byte;
 
Begin
    For j := 0 To 5 Do
    Begin
        If (baCiphertextOrPlaintext[j] = 0And (baPassword[j] = 0Then
        Begin
            baCiphertextOrPlaintext[j] := 2;
        End
        Else If (baCiphertextOrPlaintext[j] = 0And (baPassword[j] = 1Then
        Begin
            baCiphertextOrPlaintext[j] := 0;
        End
        Else If (baCiphertextOrPlaintext[j] = 0And (baPassword[j] = 2Then
        Begin
            baCiphertextOrPlaintext[j] := 0;
        End
        Else If (baCiphertextOrPlaintext[j] = 1And (baPassword[j] = 0Then
        Begin
            baCiphertextOrPlaintext[j] := 1;
        End
        Else If (baCiphertextOrPlaintext[j] = 1And (baPassword[j] = 1Then
        Begin
            baCiphertextOrPlaintext[j] := 1;
        End
        Else If (baCiphertextOrPlaintext[j] = 1And (baPassword[j] = 2Then
        Begin
            baCiphertextOrPlaintext[j] := 1;
        End
        Else If (baCiphertextOrPlaintext[j] = 2And (baPassword[j] = 0Then
        Begin
            baCiphertextOrPlaintext[j] := 0;
        End
        Else If (baCiphertextOrPlaintext[j] = 2And (baPassword[j] = 1Then
        Begin
            baCiphertextOrPlaintext[j] := 2;
        End
        Else If (baCiphertextOrPlaintext[j] = 2And (baPassword[j] = 2Then
        Begin
            baCiphertextOrPlaintext[j] := 2;
        End
    End;
End;
 
Var
    i, k, bPasswordLength : Byte;
 
    j, uiFileSize : LongWord;
 
    baPassword : Array Of TrinaryArray;
 
    baPlaintextOrCiphertext : TrinaryArray;
 
    fdPlaintextOrCiphertext : File;
 
    bpPlaintext : PByte;
 
    wpCiphertext : PWord;
 
Begin
    If(ParamCount < 4Then
    Begin
        Usage();
    End
    Else If (ParamStr(1) = '-e'Or (ParamStr(1) = '-E'Then
    Begin
        bPasswordLength := Length(ParamStr(4));
 
        SetLength(baPassword, bPasswordLength);
 
        For i := 1 To bPasswordLength Do
        Begin
            Ternary(Ord(ParamStr(4)[i]), baPassword[i - 1]);
        End;
 
        Assign(fdPlaintextOrCiphertext, ParamStr(2));
 
        Reset(fdPlaintextOrCiphertext, 1);
 
        uiFileSize := FileSize(fdPlaintextOrCiphertext);
 
        bpPlaintext := GetMem(uiFileSize);
 
        BlockRead(fdPlaintextOrCiphertext, bpPlaintext^, uiFileSize);
 
        Close(fdPlaintextOrCiphertext);
 
        wpCiphertext := GetMem(2 * uiFileSize);
 
        k := 0;
 
        For j := 0 To uiFileSize - 1 Do
        Begin
            Ternary(bpPlaintext[j], baPlaintextOrCiphertext);
 
            TernaryXor(baPlaintextOrCiphertext, baPassword[k]);
            (*TernaryXand(baPlaintextOrCiphertext, baPassword[k]);*)
 
            wpCiphertext[j] := 243 * baPlaintextOrCiphertext[0] + 81 * baPlaintextOrCiphertext[1] + 27 * baPlaintextOrCiphertext[2] + 9 * baPlaintextOrCiphertext[3] + 3 * baPlaintextOrCiphertext[4] + baPlaintextOrCiphertext[5];
 
            k := (k + 1Mod bPasswordLength;
        End;
 
        Assign(fdPlaintextOrCiphertext, Paramstr(3));
 
        Rewrite(fdPlaintextOrCiphertext, 1);
 
        BlockWrite(fdPlaintextOrCiphertext, wpCiphertext^, 2 * uiFileSize);
 
        Close(fdPlaintextOrCiphertext);
 
        FreeMem(wpCiphertext);
 
        FreeMem(bpPlaintext);
    End
    Else If (paramstr(1) = '-d'Or (paramstr(1) = '-D'Then
    Begin
        bPasswordLength := Length(ParamStr(4));
 
        SetLength(baPassword, bPasswordLength);
 
        For i := 1 To bPasswordLength Do
        Begin
            Ternary(Ord(ParamStr(4)[i]), baPassword[i - 1]);
        End;
 
        Assign(fdPlaintextOrCiphertext, ParamStr(2));
 
        Reset(fdPlaintextOrCiphertext, 1);
 
        uiFileSize := FileSize(fdPlaintextOrCiphertext);
 
        wpCiphertext := GetMem(uiFileSize);
 
        BlockRead(fdPlaintextOrCiphertext, wpCiphertext^, uiFileSize);
 
        Close(fdPlaintextOrCiphertext);
 
        uiFileSize := uiFileSize Div 2;
 
        bpPlaintext := GetMem(uiFileSize);
 
        k := 0;
 
        For j := 0 To uiFileSize - 1 Do
        Begin
            Ternary(wpCiphertext[j], baPlaintextOrCiphertext);
 
            TernaryXor(baPlaintextOrCiphertext, baPassword[k]);
            (*TernaryXand(baPlaintextOrCiphertext, baPassword[k]);*)
 
            bpPlaintext[j] := 243 * baPlaintextOrCiphertext[0] + 81 * baPlaintextOrCiphertext[1] + 27 * baPlaintextOrCiphertext[2] + 9 * baPlaintextOrCiphertext[3] + 3 * baPlaintextOrCiphertext[4] + baPlaintextOrCiphertext[5];
 
            k := (k + 1Mod bPasswordLength;
        End;
 
        Assign(fdPlaintextOrCiphertext, Paramstr(3));
 
        Rewrite(fdPlaintextOrCiphertext, 1);
 
        BlockWrite(fdPlaintextOrCiphertext, bpPlaintext^, uiFileSize);
 
        Close(fdPlaintextOrCiphertext);
 
        FreeMem(bpPlaintext);
 
        FreeMem(wpCiphertext);
    End
    Else
    Begin
        Usage();
    End
End.


Basic 源码
[Visual Basic] 纯文本查看 复制代码
?
001
002
003
004
005
006
007
008
009
010
011
012
013
014
015
016
017
018
019
020
021
022
023
024
025
026
027
028
029
030
031
032
033
034
035
036
037
038
039
040
041
042
043
044
045
046
047
048
049
050
051
052
053
054
055
056
057
058
059
060
061
062
063
064
065
066
067
068
069
070
071
072
073
074
075
076
077
078
079
080
081
082
083
084
085
086
087
088
089
090
091
092
093
094
095
096
097
098
099
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
/'******************************************************
* 作者:伍耀晖                   Author: YaoHui.Wu           *
* 开源日期:2022年6月7日   Open Source Date: 2022-6-7  *
* 国家:中国               Country: China              *
******************************************************'/
' Compiled by free basic. free basic website: www.freebasic.net
 
#include "file.bi"
 
Sub Usage()
    print "Usage" & Chr(10) & Chr(9) & "Encryption: TrinaryCipher -e/-E Plaintext.file Ciphertext.file Password" & Chr(10) & Chr(9) & "Decryption: TrinaryCipher -d/-D Ciphertext.file Plaintext.file Password"
End Sub
 
Sub Ternary(ByVal usNumeric As UShort, ubpTrinary As UByte Pointer)
    If usNumeric < 1 Then
        ubpTrinary[0] = 0
 
        ubpTrinary[1] = 0
 
        ubpTrinary[2] = 0
 
        ubpTrinary[3] = 0
 
        ubpTrinary[4] = 0
 
        ubpTrinary[5] =  0
    Else
        For As Byte = 5 To Step -1
            ubpTrinary[i] = usNumeric Mod 3
 
            usNumeric \= 3
        Next i
    End If
End Sub
 
/' 0 ? 2    0 1 2
   1 1 1 or ? 1 ?
   2 ? 0    2 1 0
'/
 
Sub TernaryXor(ubaPlaintextOrCiphertext() As UByte, ubpPassword As UByte Pointer)
    For As UByte = 0 To 5
        If ubaPlaintextOrCiphertext(j) = 0 AndAlso ubpPassword[j] = 0 Then
            ubaPlaintextOrCiphertext(j) = 2
 
        Elseif ubaPlaintextOrCiphertext(j) = 0 AndAlso ubpPassword[j] = 1 Then
            ubaPlaintextOrCiphertext(j) = 0
 
        Elseif ubaPlaintextOrCiphertext(j) = 0 AndAlso ubpPassword[j] = 2 Then
            ubaPlaintextOrCiphertext(j) = 0
 
        Elseif ubaPlaintextOrCiphertext(j) = 1 AndAlso ubpPassword[j] = 0 Then
            ubaPlaintextOrCiphertext(j) = 1
 
        Elseif ubaPlaintextOrCiphertext(j) = 1 AndAlso ubpPassword[j] = 1 Then
            ubaPlaintextOrCiphertext(j) = 1
 
        Elseif ubaPlaintextOrCiphertext(j) = 1 AndAlso ubpPassword[j] = 2 Then
            ubaPlaintextOrCiphertext(j) = 1
 
        Elseif ubaPlaintextOrCiphertext(j) = 2 AndAlso ubpPassword[j] = 0 Then
            ubaPlaintextOrCiphertext(j) = 0
 
        Elseif ubaPlaintextOrCiphertext(j) = 2 AndAlso ubpPassword[j] = 1 Then
            ubaPlaintextOrCiphertext(j) = 2
 
        Elseif ubaPlaintextOrCiphertext(j) = 2 AndAlso ubpPassword[j] = 2 Then
            ubaPlaintextOrCiphertext(j) = 2
        End If
    Next j
End Sub
 
/' 2 ? 0    2 1 0
   1 1 1 or ? 1 ?
   0 ? 2    0 1 2
'/
 
Sub TernaryXand(ubaPlaintextOrCiphertext() As UByte, ubpPassword As UByte Pointer)
    For As UByte = 0 To 5
        If ubaPlaintextOrCiphertext(j) = 0 AndAlso ubpPassword[j] = 0 Then
            ubaPlaintextOrCiphertext(j) = 2
 
        Elseif ubaPlaintextOrCiphertext(j) = 0 AndAlso ubpPassword[j] = 1 Then
            ubaPlaintextOrCiphertext(j) = 0
 
        Elseif ubaPlaintextOrCiphertext(j) = 0 AndAlso ubpPassword[j] = 2 Then
            ubaPlaintextOrCiphertext(j) = 0
 
        Elseif ubaPlaintextOrCiphertext(j) = 1 AndAlso ubpPassword[j] = 0 Then
            ubaPlaintextOrCiphertext(j) = 1
 
        Elseif ubaPlaintextOrCiphertext(j) = 1 AndAlso ubpPassword[j] = 1 Then
            ubaPlaintextOrCiphertext(j) = 1
 
        Elseif ubaPlaintextOrCiphertext(j) = 1 AndAlso ubpPassword[j] = 2 Then
            ubaPlaintextOrCiphertext(j) = 1
 
        Elseif ubaPlaintextOrCiphertext(j) = 2 AndAlso ubpPassword[j] = 0 Then
            ubaPlaintextOrCiphertext(j) = 0
 
        Elseif ubaPlaintextOrCiphertext(j) = 2 AndAlso ubpPassword[j] = 1 Then
            ubaPlaintextOrCiphertext(j) = 2
 
        Elseif ubaPlaintextOrCiphertext(j) = 2 AndAlso ubpPassword[j] = 2 Then
            ubaPlaintextOrCiphertext(j) = 2
        End If
    Next j
End Sub
 
Sub Main()
    Dim As UByte k = 0, ubCLAA = 1, ubPasswordLength, ubaPassword(), ubaPlaintextOrCiphertext(5)
 
    Dim As String strPassword
 
    Dim As UInteger uiFileSize
 
    Dim As UByte Pointer ubpPlaintext
 
    Dim As UShort Pointer uspCiphertext
 
    Do
        Dim As String strCLA = Command(ubCLAA)
 
        If Len(strCLA) = 0 Then
            Exit Do
        End If
 
        ubCLAA += 1
    Loop
 
    If ubCLAA < 5 Then
        Usage()
 
    Elseif Command(1) = "-e" OrElse Command(1) = "-E" Then
        strPassword = Command(4)
 
        ubPasswordLength = Len(Command(4))
 
        ReDim ubaPassword(ubPasswordLength - 1, 5)
 
        For As UByte = 0 To ubPasswordLength - 1
            Ternary(strPassword[i], @ubaPassword(i, 0))
        Next i
 
        uiFileSize = FileLen(Command(2))
 
        ubpPlaintext = New UByte[uiFileSize]
 
        Open Command(2) For Binary Access Read As #3
 
        Get #3, , *ubpPlaintext, uiFileSize
 
        Close #3
 
        uspCiphertext = New UShort[uiFileSize]
 
        For As ULong = 0 To uiFileSize - 1
            Ternary(ubpPlaintext[j], @ubaPlaintextOrCiphertext(0))
 
            TernaryXor(ubaPlaintextOrCiphertext(), @ubaPassword(k, 0))
            'TernaryXand(ubaPlaintextOrCiphertext(), @ubaPassword(k, 0))
 
            uspCiphertext[j] = 243 * ubaPlaintextOrCiphertext(0) + 81 * ubaPlaintextOrCiphertext(1) + 27 * ubaPlaintextOrCiphertext(2) + 9 * ubaPlaintextOrCiphertext(3) + 3 * ubaPlaintextOrCiphertext(4) + ubaPlaintextOrCiphertext(5)
 
            k = (k + 1) Mod ubPasswordLength
        Next j
 
        Delete ubpPlaintext
 
        Open Command(3) For Binary Access Write As #4
 
        Put #4, , *uspCiphertext, uiFileSize
 
        Close #4
 
        Delete uspCiphertext
 
    Elseif Command(1) = "-d" OrElse Command(1) = "-D" Then
        strPassword = Command(4)
 
        ubPasswordLength = Len(Command(4))
 
        ReDim ubaPassword(ubPasswordLength - 1, 5)
 
        For As UByte = 0 To ubPasswordLength - 1
            Ternary(strPassword[i], @ubaPassword(i, 0))
        Next i
 
        uiFileSize = FileLen(Command(2)) \ 2
 
        uspCiphertext = New UShort[uiFileSize]
 
        Open Command(2) For Binary Access Read As #3
 
        Get #3, , *uspCiphertext, uiFileSize
 
        Close #3
 
        ubpPlaintext = New UByte[uiFileSize]
 
        For As UInteger = 0 To uiFileSize - 1
            Ternary(uspCiphertext[j], @ubaPlaintextOrCiphertext(0))
 
            TernaryXor(ubaPlaintextOrCiphertext(), @ubaPassword(k, 0))
            'TernaryXand(ubaPlaintextOrCiphertext(), @ubaPassword(k, 0))
 
            ubpPlaintext[j] = 243 * ubaPlaintextOrCiphertext(0) + 81 * ubaPlaintextOrCiphertext(1) + 27 * ubaPlaintextOrCiphertext(2) + 9 * ubaPlaintextOrCiphertext(3) + 3 * ubaPlaintextOrCiphertext(4) + ubaPlaintextOrCiphertext(5)
 
            k = (k + 1) Mod ubPasswordLength
 
        Next j
 
        Delete uspCiphertext
 
        Open Command(3) For Binary Access Write As #4
 
        Put #4, , *ubpPlaintext, uiFileSize
 
        Close #4
 
        Delete ubpPlaintext
 
    Else
        Usage()
    End If
End Sub
 
Main()
坐等赶超美国见证奇迹
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/很楠不爱3/article/detail/659542
推荐阅读
相关标签
  

闽ICP备14008679号