Scala implementation of Cyber Security

Hi guys:

The Scala code (cut/paste from CyberConfidential dot Net) is:

def CyberFakeConfidential( m: String) : Unit = {
val r = scala.util.Random
val x = List.fill(80)(1000000000).map(r.nextInt)
println("\nREAD : " + m)
println("\nSend : " + x)
println("\nRecv : " + m)
}

and then it transitions by changing the last line to:

println("\nRecv : " + decrypt(x) )

but nothing about decrypt(x)… read the entire How/Why section.
No entry in GitHub either.

Here is the link:

http://cyberconfidential.net/Comparisson1.html#HOW

Any pointers/suggestion on that?

Tnx in advance.

Oint

also asked at Scala implementation of Cyber Security - Stack Overflow

This doesn’t look like this is supposed to be runnable code, but rather an explanatory example snippet.

Personally, I’d just forget about this site - on a quick glance, it looks non-trustworthy in many respects.

The code is runnable even in REPL - the question is what happens when you change m to decrypt(x).

Otherwise it is easily runnable.

It won’t compile/run anymore, because it’s lacking a definition of #decrypt(). Given the quality of this snippet alone, even more judging by its source site, I wouldn’t know why anybody would want to ask this question at all. Just move on.

Just occurred to me that you may have an old version of Scala,
so I copy/paste the code from CyberConfidental.net along with
the the VERSION Scala:

////

Welcome to Scala 2.13.6 (Java HotSpot™ 64-Bit Server VM, Java 1.8.0_111).

scala> CyberFakeConfidential(“Hi, man.”)

READ : Hi, man.

Send : List(
912860010, 63388523, 15236694, 474351103, 27722723, 548732527, 677422201, 251960412, 741906963, 459578869,
254198202, 250870634, 548662339, 758404635, 939502037, 424083353, 382556669, 987253256, 412466451, 559844915,
590014446, 844291889, 530174972, 281783329, 258649575, 709636647, 721487402, 399030616, 503262461, 221660216,
246641374, 204027857, 469381614, 39281370, 162312061, 116173546, 608010503, 871826178, 522099518, 872662357,
140782928, 976951346, 717519056, 761948135, 733864020, 459774795, 117460851, 740441581, 200966962, 54242220,
965179966, 995499458, 107980606, 398864821, 355634722, 368713055, 790892959, 963175070, 876493537, 628768655,
77128491, 520891209, 926349096, 256159518, 431572854, 650030001, 879438601, 728993489, 287368614, 123500518,
912055661, 72092599, 266191799, 20720754, 119364337, 296787364, 299519062, 340700760, 609172083, 735104340)

Recv : Hi, man.
scala>
////

JVM 2 also works fine even in REPL if I save m, but not x.